diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-11-02 23:40:00 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-11-02 23:40:00 +0000 |
commit | 70ae1226d9a479e56ac716396bdf97dc970ac840 (patch) | |
tree | d6bd03c2876f351a108f092ce46cbf54d5a1f01f /lib/CodeGen/CGDebugInfo.cpp | |
parent | 61fc02c87d6bf3453cad0d0ca85bc3f3fd462aa5 (diff) |
Emit debug info for C++ struct definitions as DW_TAG_structure_type (instead of class_type).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167336 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index e873806b91..7dfaaa4708 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1875,7 +1875,7 @@ llvm::DIType CGDebugInfo::CreateLimitedType(const RecordType *Ty) { // Get overall information about the record type for the debug info. llvm::DIFile DefUnit = getOrCreateFile(RD->getLocation()); unsigned Line = getLineNumber(RD->getLocation()); - StringRef RDName = RD->getName(); + StringRef RDName = getClassName(RD); llvm::DIDescriptor RDContext; if (CGM.getCodeGenOpts().getDebugInfo() == CodeGenOptions::LimitedDebugInfo) @@ -1896,9 +1896,7 @@ llvm::DIType CGDebugInfo::CreateLimitedType(const RecordType *Ty) { if (RD->isUnion()) RealDecl = DBuilder.createUnionType(RDContext, RDName, DefUnit, Line, Size, Align, 0, llvm::DIArray()); - else if (CXXDecl) { - RDName = getClassName(RD); - + else if (RD->isClass()) { // FIXME: This could be a struct type giving a default visibility different // than C++ class type, but needs llvm metadata changes first. RealDecl = DBuilder.createClassType(RDContext, RDName, DefUnit, Line, |