diff options
| author | Adrian Prantl <aprantl@apple.com> | 2016-01-19 18:02:47 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2016-01-19 18:02:47 +0000 |
| commit | ed2c14216cb447992d4096de7055df10bd80bc4c (patch) | |
| tree | e29e7a33ae98c3b353ff07f544aede377ec99eb0 /lib/CodeGen/ObjectFilePCHContainerOperations.cpp | |
| parent | 30395ea6a760198a47fbc6e9567aafd8970d938c (diff) | |
| download | clang-ed2c14216cb447992d4096de7055df10bd80bc4c.tar.gz | |
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258152 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ObjectFilePCHContainerOperations.cpp')
| -rw-r--r-- | lib/CodeGen/ObjectFilePCHContainerOperations.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/ObjectFilePCHContainerOperations.cpp b/lib/CodeGen/ObjectFilePCHContainerOperations.cpp index f385e53fa0..2c0c3ca8a9 100644 --- a/lib/CodeGen/ObjectFilePCHContainerOperations.cpp +++ b/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); |
