diff options
| author | Douglas Gregor <dgregor@apple.com> | 2009-04-21 17:11:58 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2009-04-21 17:11:58 +0000 |
| commit | beecd58e21ec458d543bd5ae332d8358578d0251 (patch) | |
| tree | 654a2a949dcdb3e8f42d560070b8f2035d613fd8 /clang/lib/Sema/Sema.h | |
| parent | 69223bb7f5a99de5d6acdbb5e79bf9bc2ab6faca (diff) | |
| download | bcm5719-llvm-beecd58e21ec458d543bd5ae332d8358578d0251.tar.gz bcm5719-llvm-beecd58e21ec458d543bd5ae332d8358578d0251.zip | |
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.
llvm-svn: 69681
Diffstat (limited to 'clang/lib/Sema/Sema.h')
| -rw-r--r-- | clang/lib/Sema/Sema.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h index 1f6cd0440c4..f3c337c148e 100644 --- a/clang/lib/Sema/Sema.h +++ b/clang/lib/Sema/Sema.h @@ -233,6 +233,14 @@ public: /// not visible. llvm::DenseMap<DeclarationName, NamedDecl *> LocallyScopedExternalDecls; + /// \brief The set of tentative declarations seen so far in this + /// translation unit for which no definition has been seen. + /// + /// The tentative declarations are indexed by the name of the + /// declaration, and only the most recent tentative declaration for + /// a given variable will be recorded here. + llvm::DenseMap<DeclarationName, VarDecl *> TentativeDefinitions; + IdentifierResolver IdResolver; // Enum values used by KnownFunctionIDs (see below). |

