aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-05-23 00:09:47 +0000
committerEric Christopher <echristo@apple.com>2012-05-23 00:09:47 +0000
commit9ee5f4641ee0d018cb6a2ce16611bfa170a5ecea (patch)
tree898f62656714f61a4098daa813a3934aabc018b3 /lib/CodeGen/CGDebugInfo.cpp
parentc052dbb2d8fe0e23e90d81236aab0f864f712b45 (diff)
Emit C++11 enum class information if it exists.
Part of rdar://11496790 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157304 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 1df32d85cc..3899604d75 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -1586,9 +1586,12 @@ llvm::DIType CGDebugInfo::CreateEnumType(const EnumDecl *ED) {
}
llvm::DIDescriptor EnumContext =
getContextDescriptor(cast<Decl>(ED->getDeclContext()));
+ llvm::DIType ClassTy = ED->isScopedUsingClassTag() ?
+ getOrCreateType(ED->getIntegerType(), DefUnit) : llvm::DIType();
llvm::DIType DbgTy =
DBuilder.createEnumerationType(EnumContext, ED->getName(), DefUnit, Line,
- Size, Align, EltArray);
+ Size, Align, EltArray,
+ ClassTy);
return DbgTy;
}