Move the complex address expression out of DIVariable and into an extra
[oota-llvm.git] / unittests / Transforms / Utils / Cloning.cpp
index 571008e07f749bb784f59fe3e9f33339bb8276c4..c7799795d9be94a1f56649853c402c528b8a5cc9 100644 (file)
@@ -255,10 +255,11 @@ protected:
     // Create a local variable around the alloca
     DIType IntType = DBuilder.createBasicType("int", 32, 0,
         dwarf::DW_ATE_signed);
+    DIExpression E = DBuilder.createExpression();
     DIVariable Variable = DBuilder.createLocalVariable(
       dwarf::DW_TAG_auto_variable, Subprogram, "x", File, 5, IntType, true);
-    DBuilder.insertDeclare(Alloca, Variable, Store);
-    DBuilder.insertDbgValueIntrinsic(AllocaContent, 0, Variable, Terminator);
+    DBuilder.insertDeclare(Alloca, Variable, E, Store);
+    DBuilder.insertDbgValueIntrinsic(AllocaContent, 0, Variable, E, Terminator);
     // Finalize the debug info
     DBuilder.finalize();