diff options
author | Devang Patel <dpatel@apple.com> | 2010-08-10 18:27:15 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-08-10 18:27:15 +0000 |
commit | 76e3b5354100a459fdd3cb5997f1a36c0c40ea81 (patch) | |
tree | 2f9c69cbb597d6bb29235362d14ffb3f87fb62e1 /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | 32e59ba01dfeae0dcd9894d6a7bcf3ec55ff5957 (diff) | |
download | bcm5719-llvm-76e3b5354100a459fdd3cb5997f1a36c0c40ea81.tar.gz bcm5719-llvm-76e3b5354100a459fdd3cb5997f1a36c0c40ea81.zip |
Do not use DIGlobalVariable to emit debugging information for enums.
llvm-svn: 110697
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index a75ff104767..4e020f92cea 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -1808,6 +1808,10 @@ void CGDebugInfo::EmitGlobalVariable(const ValueDecl *VD, // Create the descriptor for the variable. llvm::DIFile Unit = getOrCreateFile(VD->getLocation()); llvm::StringRef Name = VD->getName(); + llvm::DIType Ty = getOrCreateType(VD->getType(), Unit); + // Do not use DIGlobalVariable for enums. + if (Ty.getTag() == llvm::dwarf::DW_TAG_enumeration_type) + return; DebugFactory.CreateGlobalVariable(Unit, Name, Name, Name, Unit, getLineNumber(VD->getLocation()), getOrCreateType(VD->getType(), Unit), |