aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-08-22 21:01:12 +0000
committerJohn McCall <rjmccall@apple.com>2010-08-22 21:01:12 +0000
commitf16aa103d3afd42fbca2ab346f191bf745cec092 (patch)
treeaf2fd36fb705f0d900afe40561c89341546459b6 /lib/CodeGen/CodeGenModule.h
parentb76495673a381d209410d78af9d969bb3ae0a95a (diff)
Go back to asking CodeGenTypes whether a type is zero-initializable.
Make CGT defer to the ABI on all member pointer types. This requires giving CGT a handle to the ABI. It's way easier to make that work if we avoid lazily creating the ABI. Make it so. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111786 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r--lib/CodeGen/CodeGenModule.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h
index 426499d6eb..f44c8236fe 100644
--- a/lib/CodeGen/CodeGenModule.h
+++ b/lib/CodeGen/CodeGenModule.h
@@ -109,6 +109,7 @@ class CodeGenModule : public BlockModule {
const llvm::TargetData &TheTargetData;
mutable const TargetCodeGenInfo *TheTargetCodeGenInfo;
Diagnostic &Diags;
+ CGCXXABI &ABI;
CodeGenTypes Types;
/// VTables - Holds information about C++ vtables.
@@ -116,7 +117,6 @@ class CodeGenModule : public BlockModule {
friend class CodeGenVTables;
CGObjCRuntime* Runtime;
- CGCXXABI* ABI;
CGDebugInfo* DebugInfo;
// WeakRefReferences - A set of references that have only been seen via
@@ -189,8 +189,6 @@ class CodeGenModule : public BlockModule {
/// Lazily create the Objective-C runtime
void createObjCRuntime();
- /// Lazily create the C++ ABI
- void createCXXABI();
llvm::LLVMContext &VMContext;
@@ -228,15 +226,8 @@ public:
/// been configured.
bool hasObjCRuntime() { return !!Runtime; }
- /// getCXXABI() - Return a reference to the configured
- /// C++ ABI.
- CGCXXABI &getCXXABI() {
- if (!ABI) createCXXABI();
- return *ABI;
- }
-
- /// hasCXXABI() - Return true iff a C++ ABI has been configured.
- bool hasCXXABI() { return !!ABI; }
+ /// getCXXABI() - Return a reference to the configured C++ ABI.
+ CGCXXABI &getCXXABI() { return ABI; }
llvm::Value *getStaticLocalDeclAddress(const VarDecl *VD) {
return StaticLocalDeclMap[VD];
@@ -253,8 +244,7 @@ public:
llvm::Module &getModule() const { return TheModule; }
CodeGenTypes &getTypes() { return Types; }
MangleContext &getMangleContext() {
- if (!ABI) createCXXABI();
- return ABI->getMangleContext();
+ return ABI.getMangleContext();
}
CodeGenVTables &getVTables() { return VTables; }
Diagnostic &getDiags() const { return Diags; }