aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprScalar.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-10-08 18:24:19 +0000
committerDevang Patel <dpatel@apple.com>2010-10-08 18:24:19 +0000
commitcedbf43c90d8850106ec3d0da5dca65267137a0b (patch)
tree82091c3266177db4b42648e3c4d2ac4e5e99a44e /lib/CodeGen/CGExprScalar.cpp
parent4081a5c5f1381c4ec77f8ab3866693917e4329c4 (diff)
Tighter check in r116060 blcoked enums also. Emit enum const's debug info.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116071 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r--lib/CodeGen/CGExprScalar.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp
index 8e01b7c212..bc67eb8e0b 100644
--- a/lib/CodeGen/CGExprScalar.cpp
+++ b/lib/CodeGen/CGExprScalar.cpp
@@ -166,10 +166,10 @@ public:
llvm::ConstantInt *CI
= llvm::ConstantInt::get(VMContext, Result.Val.getInt());
if (VarDecl *VD = dyn_cast<VarDecl>((E->getDecl()))) {
- if (!VD->isFileVarDecl()) {
+ if (!CGF.getContext().DeclMustBeEmitted(VD))
CGF.EmitDeclRefExprDbgValue(E, CI);
- }
- }
+ } else if (isa<EnumConstantDecl>(E->getDecl()))
+ CGF.EmitDeclRefExprDbgValue(E, CI);
return CI;
}
return EmitLoadOfLValue(E);