aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
diff options
context:
space:
mode:
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 f385e53..2c0c3ca 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);