summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-11-02 23:40:00 +0000
committerDavid Blaikie <dblaikie@gmail.com>2012-11-02 23:40:00 +0000
commit8ed46b99353f5b427d73aaddb7b0c2e2a0a8f26c (patch)
treeaefaf3d0f946baf1e16ad7cb355e5ae071e32c60 /clang/lib/CodeGen
parent654e3b40f5a0075464261340509d062411d87194 (diff)
downloadbcm5719-llvm-8ed46b99353f5b427d73aaddb7b0c2e2a0a8f26c.tar.gz
bcm5719-llvm-8ed46b99353f5b427d73aaddb7b0c2e2a0a8f26c.zip
Emit debug info for C++ struct definitions as DW_TAG_structure_type (instead of class_type).
llvm-svn: 167336
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index e873806b914..7dfaaa47080 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/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,
OpenPOWER on IntegriCloud