Skip to content

Commit 3db5480

Browse files
author
Devang Patel
committed
Tighter check in r116060 blcoked enums also. Emit enum const's debug info.
llvm-svn: 116071
1 parent 9426870 commit 3db5480

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/lib/CodeGen/CGExprScalar.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,10 @@ class ScalarExprEmitter
166166
llvm::ConstantInt *CI
167167
= llvm::ConstantInt::get(VMContext, Result.Val.getInt());
168168
if (VarDecl *VD = dyn_cast<VarDecl>((E->getDecl()))) {
169-
if (!VD->isFileVarDecl()) {
169+
if (!CGF.getContext().DeclMustBeEmitted(VD))
170170
CGF.EmitDeclRefExprDbgValue(E, CI);
171-
}
172-
}
171+
} else if (isa<EnumConstantDecl>(E->getDecl()))
172+
CGF.EmitDeclRefExprDbgValue(E, CI);
173173
return CI;
174174
}
175175
return EmitLoadOfLValue(E);

0 commit comments

Comments
 (0)