summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2016-01-19 18:02:47 +0000
committerAdrian Prantl <aprantl@apple.com>2016-01-19 18:02:47 +0000
commite5238d2a82448674567cb47f7ca0486f36c028a9 (patch)
tree00be5bed8c158470407fb4b6baf98c30289586b2 /clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
parentb541a3488fe5713ce2b32c0ae3dda15ee7984b26 (diff)
downloadbcm5719-llvm-e5238d2a82448674567cb47f7ca0486f36c028a9.tar.gz
bcm5719-llvm-e5238d2a82448674567cb47f7ca0486f36c028a9.zip
Module Debugging: Defer the emission of anonymous tag decls
until we are visiting their declcontext. This fixes a regression introduced in r256962: When building debug info for a typdef'd anonymous tag type, we would be visiting the inner anonymous type first thus creating a "typedef changes linkage of anonymous type, but linkage was already computed" error. rdar://problem/24199640 llvm-svn: 258152
Diffstat (limited to 'clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp')
-rw-r--r--clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
index f385e53fa01..2c0c3ca8a90 100644
--- a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
+++ b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
@@ -190,6 +190,10 @@ public:
if (D->isFromASTFile())
return;
+ // Anonymous tag decls are deferred until we are building their declcontext.
+ if (D->getName().empty())
+ return;
+
DebugTypeVisitor DTV(*Builder->getModuleDebugInfo(), *Ctx, false);
DTV.TraverseDecl(D);
Builder->UpdateCompletedType(D);
OpenPOWER on IntegriCloud