summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-08-10 20:01:20 +0000
committerDevang Patel <dpatel@apple.com>2010-08-10 20:01:20 +0000
commit8e06a5eb4751e9be8558c9957d209882a49e3ca6 (patch)
treed97d3b65143f7ad0ae40047d2b1737deea6e1e28 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent18cc4acb001552340e4e29c49872d0995f0a7f28 (diff)
downloadbcm5719-llvm-8e06a5eb4751e9be8558c9957d209882a49e3ca6.tar.gz
bcm5719-llvm-8e06a5eb4751e9be8558c9957d209882a49e3ca6.zip
Do not forget debug info for enums. Use named mdnode to keep track of these types.
llvm-svn: 110712
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index e0a43a93d4f..e236c1b227e 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -2019,6 +2019,11 @@ void DwarfDebug::beginModule(Module *M) {
E = DbgFinder.global_variable_end(); I != E; ++I)
constructGlobalVariableDIE(*I);
+ //getOrCreateTypeDIE
+ if (NamedMDNode *NMD = M->getNamedMetadata("llvm.dbg.enum"))
+ for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i)
+ getOrCreateTypeDIE(DIType(NMD->getOperand(i)));
+
// Prime section data.
SectionMap.insert(Asm->getObjFileLowering().getTextSection());
OpenPOWER on IntegriCloud