Set the final flag for the global type.
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Mon, 9 Oct 2006 16:24:25 +0000 (16:24 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Mon, 9 Oct 2006 16:24:25 +0000 (16:24 +0000)
[r8325]

ir/ir/irprog.c

index 09e3226..821551e 100644 (file)
@@ -73,10 +73,14 @@ static ir_prog *complete_ir_prog(ir_prog *irp) {
   remove_irp_type(irp->glob_type);
   remove_irp_type(irp->tls_type);
 
-  /* set these flags for debugging */
+  /* Set these flags for debugging. */
   irp->glob_type->flags |= tf_global_type;
   irp->tls_type->flags  |= tf_tls_type;
 
+  /* The global type is a class, but we cannot derive from it, so set
+     the final property to assist optimizations that checks for it. */
+  set_class_final(irp->glob_type, 1);
+
   irp->const_code_irg   = new_const_code_irg();
 
   irp->phase_state      = phase_building;