diff options
author | Adrian McCarthy <amccarth@google.com> | 2016-07-21 13:41:25 +0000 |
---|---|---|
committer | Adrian McCarthy <amccarth@google.com> | 2016-07-21 13:41:25 +0000 |
commit | a9a89ae77f7cce2bf9a38c0fcb861c3fe6f50b97 (patch) | |
tree | 1fbbd7ee3a0c53d1932d4fd5fc9ce684ec6a1e60 /clang/lib/CodeGen | |
parent | a9e477b286eba7a069e2e2a41cdd2dc6dc96893a (diff) | |
download | bcm5719-llvm-a9a89ae77f7cce2bf9a38c0fcb861c3fe6f50b97.tar.gz bcm5719-llvm-a9a89ae77f7cce2bf9a38c0fcb861c3fe6f50b97.zip |
Revert "Include unreferenced nested types in member list only for CodeView"
Patch broke ModuleDebugInfo test on the build bots (but not locally). Again.
svn revision: r276271
This reverts commit 9da8a1b05362bc96f2855fb32b5588b89407685d.
llvm-svn: 276279
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 21 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.h | 2 |
2 files changed, 3 insertions, 20 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 9763e9b51a8..5e9d73f082f 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -1090,14 +1090,6 @@ void CGDebugInfo::CollectRecordNormalField( elements.push_back(FieldType); } -void CGDebugInfo::CollectRecordNestedRecord( - const RecordDecl *RD, SmallVectorImpl<llvm::Metadata *> &elements) { - QualType Ty = CGM.getContext().getTypeDeclType(RD); - SourceLocation Loc = RD->getLocation(); - llvm::DIType *nestedType = getOrCreateType(Ty, getOrCreateFile(Loc)); - elements.push_back(nestedType); -} - void CGDebugInfo::CollectRecordFields( const RecordDecl *record, llvm::DIFile *tunit, SmallVectorImpl<llvm::Metadata *> &elements, @@ -1109,10 +1101,6 @@ void CGDebugInfo::CollectRecordFields( else { const ASTRecordLayout &layout = CGM.getContext().getASTRecordLayout(record); - // Debug info for nested records is included in the member list only for - // CodeView. - bool IncludeNestedRecords = CGM.getCodeGenOpts().EmitCodeView; - // Field number for non-static fields. unsigned fieldNo = 0; @@ -1138,10 +1126,7 @@ void CGDebugInfo::CollectRecordFields( // Bump field number for next field. ++fieldNo; - } else if (const auto *nestedRec = dyn_cast<CXXRecordDecl>(I)) - if (IncludeNestedRecords && !nestedRec->isImplicit() && - nestedRec->getDeclContext() == record) - CollectRecordNestedRecord(nestedRec, elements); + } } } @@ -3635,8 +3620,8 @@ void CGDebugInfo::EmitUsingDirective(const UsingDirectiveDecl &UD) { if (CGM.getCodeGenOpts().getDebugInfo() < codegenoptions::LimitedDebugInfo) return; const NamespaceDecl *NSDecl = UD.getNominatedNamespace(); - if (!NSDecl->isAnonymousNamespace() || - CGM.getCodeGenOpts().DebugExplicitImport) { + if (!NSDecl->isAnonymousNamespace() || + CGM.getCodeGenOpts().DebugExplicitImport) { DBuilder.createImportedModule( getCurrentContextDescriptor(cast<Decl>(UD.getDeclContext())), getOrCreateNameSpace(NSDecl), diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h index 70c16462965..366dd81ac81 100644 --- a/clang/lib/CodeGen/CGDebugInfo.h +++ b/clang/lib/CodeGen/CGDebugInfo.h @@ -254,8 +254,6 @@ class CGDebugInfo { llvm::DIFile *F, SmallVectorImpl<llvm::Metadata *> &E, llvm::DIType *RecordTy, const RecordDecl *RD); - void CollectRecordNestedRecord(const RecordDecl *RD, - SmallVectorImpl<llvm::Metadata *> &E); void CollectRecordFields(const RecordDecl *Decl, llvm::DIFile *F, SmallVectorImpl<llvm::Metadata *> &E, llvm::DICompositeType *RecordTy); |