2
0
Эх сурвалжийг харах

mark removable interfaces as extern so they are removed even without DCE

Simon Krajewski 9 жил өмнө
parent
commit
cfe9ee1628
1 өөрчлөгдсөн 4 нэмэгдсэн , 1 устгасан
  1. 4 1
      filters.ml

+ 4 - 1
filters.ml

@@ -1141,7 +1141,10 @@ let do_the_tivo_thing ctx =
 	let run = substitute_expr in
 	List.iter (fun mt -> match mt with
 		| TClassDecl c ->
-			if get_substitute_class c != c && c.cl_implements = [] then c.cl_meta <- (Meta.Remove,[],c.cl_pos) :: c.cl_meta;
+			if get_substitute_class c != c && c.cl_implements = [] then begin
+				c.cl_meta <- (Meta.Remove,[],c.cl_pos) :: c.cl_meta;
+				c.cl_extern <- true;
+			end;
 			let rec process_field f =
 				f.cf_type <- substitute_type f.cf_type;
 				begin match f.cf_expr with