diff options
author | Devang Patel <dpatel@apple.com> | 2010-10-27 23:23:58 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-10-27 23:23:58 +0000 |
commit | 4bc48877db95b2afd6207fdb54ce271169c994f9 (patch) | |
tree | 18148eaba15a3fa6c7d659d0d2e837fc317eb042 /lib/CodeGen/CGDebugInfo.cpp | |
parent | b03a9287c287a62ad85e496cfd263a2c92efddbb (diff) |
Fix context info for enums.
Radar 8595129
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117507 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 241b25f2e5..6f905c09ba 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1376,10 +1376,12 @@ llvm::DIType CGDebugInfo::CreateEnumType(const EnumDecl *ED, llvm::DIFile Unit){ Size = CGM.getContext().getTypeSize(ED->getTypeForDecl()); Align = CGM.getContext().getTypeAlign(ED->getTypeForDecl()); } + llvm::DIDescriptor EnumContext = + getContextDescriptor(dyn_cast<Decl>(ED->getDeclContext()), Unit); llvm::DIType DbgTy = DebugFactory.CreateCompositeType(llvm::dwarf::DW_TAG_enumeration_type, - Unit, ED->getName(), DefUnit, Line, - Size, Align, 0, 0, + EnumContext, ED->getName(), + DefUnit, Line, Size, Align, 0, 0, llvm::DIType(), EltArray); return DbgTy; } |