aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-21 17:11:58 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-21 17:11:58 +0000
commitb6c8c8bd8d362c8a6cdb767415b0d21e62b77eb2 (patch)
tree9d574fc3b816875c30e2e97338b0fa8338fb3079 /lib/CodeGen/CodeGenModule.h
parent69667a03e07a052170f09226ef7614ca8ab21ac7 (diff)
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
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r--lib/CodeGen/CodeGenModule.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h
index e7924fade5..21ef8da863 100644
--- a/lib/CodeGen/CodeGenModule.h
+++ b/lib/CodeGen/CodeGenModule.h
@@ -119,14 +119,6 @@ class CodeGenModule : public BlockModule {
/// is done.
std::vector<const ValueDecl*> DeferredDeclsToEmit;
- /// TentativeDefinitions - A list of declarations which are
- /// tentative definitions. Code generation for these must be
- /// deferred because they are allowed to have incomplete type when
- /// they are seen. This also allows us to avoid generating an extra
- /// common definiton in situations where the tentative definition is
- /// followed by an actual definition.
- std::vector<const VarDecl*> TentativeDefinitions;
-
/// LLVMUsed - List of global values which are required to be
/// present in the object file; bitcast to i8*. This is used for
/// forcing visibility of symbols which may otherwise be optimized
@@ -339,6 +331,8 @@ public:
CXXCtorType Type);
const char *getMangledCXXDtorName(const CXXDestructorDecl *D,
CXXDtorType Type);
+
+ void EmitTentativeDefinition(const VarDecl *D);
enum GVALinkage {
GVA_Internal,
@@ -382,7 +376,6 @@ private:
void EmitGlobalDefinition(const ValueDecl *D);
void EmitGlobalFunctionDefinition(const FunctionDecl *D);
- void EmitTentativeDefinition(const VarDecl *D);
void EmitGlobalVarDefinition(const VarDecl *D);
void EmitAliasDefinition(const ValueDecl *D);
void EmitObjCPropertyImplementations(const ObjCImplementationDecl *D);