summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-08-01 18:56:13 +0000
committerReid Kleckner <rnk@google.com>2016-08-01 18:56:13 +0000
commit755220bcefcf90ebbcc54f03392a809d84d64146 (patch)
treed52ba8d68037ad6e6f85aac989e8ada2f2e079d7 /clang/lib/CodeGen/CGDebugInfo.cpp
parent5f0e76dca64c24ac9b97536d75b8438b86a7b8db (diff)
downloadbcm5719-llvm-755220bcefcf90ebbcc54f03392a809d84d64146.tar.gz
bcm5719-llvm-755220bcefcf90ebbcc54f03392a809d84d64146.zip
[codeview] Skip injected class names in nested record emission
We were already trying to do this, but our check wasn't quite right. Fixes PR28790 llvm-svn: 277367
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index b99b519a966..d6cb798c475 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1092,6 +1092,9 @@ void CGDebugInfo::CollectRecordNormalField(
void CGDebugInfo::CollectRecordNestedRecord(
const RecordDecl *RD, SmallVectorImpl<llvm::Metadata *> &elements) {
QualType Ty = CGM.getContext().getTypeDeclType(RD);
+ // Injected class names are not considered nested records.
+ if (isa<InjectedClassNameType>(Ty))
+ return;
SourceLocation Loc = RD->getLocation();
llvm::DIType *nestedType = getOrCreateType(Ty, getOrCreateFile(Loc));
elements.push_back(nestedType);
OpenPOWER on IntegriCloud