]> granicus.if.org Git - clang/commit
Explictly track tentative definitions within Sema, then hand those
authorDouglas Gregor <dgregor@apple.com>
Tue, 21 Apr 2009 17:11:58 +0000 (17:11 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 21 Apr 2009 17:11:58 +0000 (17:11 +0000)
commitb6c8c8bd8d362c8a6cdb767415b0d21e62b77eb2
tree9d574fc3b816875c30e2e97338b0fa8338fb3079
parent69667a03e07a052170f09226ef7614ca8ab21ac7
Explictly track tentative definitions within Sema, then hand those
tentative definitions off to the ASTConsumer at the end of the
translation unit.

Eliminate CodeGen's internal tracking of tentative definitions, and
instead hook into ASTConsumer::CompleteTentativeDefinition. Also,
tweak the definition-deferal logic for C++, where there are no
tentative definitions.

Fixes <rdar://problem/6808352>, and will make it much easier for
precompiled headers to cope with tentative definitions in the future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69681 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/clang/AST/ASTConsumer.h
lib/AST/Decl.cpp
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenModule.h
lib/CodeGen/ModuleBuilder.cpp
lib/Sema/Sema.cpp
lib/Sema/Sema.h
lib/Sema/SemaDecl.cpp
test/PCH/external-defs.h
test/Sema/init.c
test/Sema/tentative-decls.c
tools/clang-cc/Backend.cpp