ir_function_inlining: Handle inlining of structure dereferences.
authorEric Anholt <eric@anholt.net>
Mon, 26 Apr 2010 22:02:40 +0000 (15:02 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 29 Apr 2010 01:22:54 +0000 (18:22 -0700)
ir_function_inlining.cpp

index 5b1b3cb8b0b7fa13797636299fd82b12cbf71d78..385ce9ef6d79dc9192336034cdb69b3edb140d5f 100644 (file)
@@ -205,8 +205,7 @@ ir_function_cloning_visitor::visit(ir_dereference *ir)
       this->result = new ir_dereference(var, index);
    } else {
       assert(ir->mode == ir_dereference::ir_reference_record);
-      /* FINISHME: inlining of structure references */
-      assert(0);
+      this->result = new ir_dereference(var, strdup(ir->selector.field));
    }
 }