diff options
author | Devang Patel <dpatel@apple.com> | 2010-08-10 07:24:25 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-08-10 07:24:25 +0000 |
commit | 8d308384a220c7dc81755c47cdcbdd87dac25d5b (patch) | |
tree | 375ad9e9469e9377ce793ec7b2fd4f893fe36bf6 /lib/CodeGen/CGExprScalar.cpp | |
parent | bf87f2c1c6e2d8cb50902a6d79e8b170c19570d2 (diff) |
Even if a constant's evaluated value is used, emit debug info for the constant variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110660 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index c9e4dbd140..f6f126a8a6 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -149,6 +149,7 @@ public: Expr::EvalResult Result; if (E->Evaluate(Result, CGF.getContext()) && Result.Val.isInt()) { assert(!Result.HasSideEffects && "Constant declref with side-effect?!"); + CGF.EmitDeclRefExprDbgValue(E, Result.Val); return llvm::ConstantInt::get(VMContext, Result.Val.getInt()); } return EmitLoadOfLValue(E); |