summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2016-01-19 23:42:53 +0000
committerAdrian Prantl <aprantl@apple.com>2016-01-19 23:42:53 +0000
commit43e008174072301cca77524027ddb74d1d8b604a (patch)
tree529a4f7a4bb88af2db2de2bddfb919eb34c7b96d /clang/lib/CodeGen/CGDebugInfo.cpp
parentcd975018feb88d2ae9f83b712b1d3684985df0f3 (diff)
downloadbcm5719-llvm-43e008174072301cca77524027ddb74d1d8b604a.tar.gz
bcm5719-llvm-43e008174072301cca77524027ddb74d1d8b604a.zip
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. <rdar://problem/24199640> llvm-svn: 258251
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp5
1 files changed, 3 insertions, 2 deletions
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;
OpenPOWER on IntegriCloud