From 43e008174072301cca77524027ddb74d1d8b604a Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Tue, 19 Jan 2016 23:42:53 +0000 Subject: Module Debugging: Don't emit external type references to anonymous types. Even if they exist in the module, they can't be matched with the forward declaration in the object file. llvm-svn: 258251 --- clang/lib/CodeGen/CGDebugInfo.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp') diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 2511b249f0f..fa501fce756 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -1536,8 +1536,9 @@ static bool shouldOmitDefinition(CodeGenOptions::DebugInfoKind DebugKind, const RecordDecl *RD, const LangOptions &LangOpts) { // Does the type exist in an imported clang module? - if (DebugTypeExtRefs && RD->isFromASTFile() && RD->getDefinition()) - return true; + if (DebugTypeExtRefs && RD->isFromASTFile() && RD->getDefinition() && + RD->isExternallyVisible()) + return true; if (DebugKind > CodeGenOptions::LimitedDebugInfo) return false; -- cgit v1.2.3