Move the complex address expression out of DIVariable and into an extra
[oota-llvm.git] / lib / Transforms / Scalar / ScalarReplAggregates.cpp
index eb8d2a6f73fc3efc70a59ba9bbb16eff901a7ba8..c6d6ec73761a66b57520b2dd1796bbaa54df8319 100644 (file)
@@ -1124,9 +1124,9 @@ public:
       } else {
         continue;
       }
-      Instruction *DbgVal =
-        DIB->insertDbgValueIntrinsic(Arg, 0, DIVariable(DVI->getVariable()),
-                                     Inst);
+      Instruction *DbgVal = DIB->insertDbgValueIntrinsic(
+          Arg, 0, DIVariable(DVI->getVariable()),
+          DIExpression(DVI->getExpression()), Inst);
       DbgVal->setDebugLoc(DVI->getDebugLoc());
     }
   }