summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-01-23 11:10:26 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-01-23 11:10:26 +0000
commit5044f5c816adfd5cba17f1adee1a10127296d0bf (patch)
treec69d3f4f13d508570bb5257a6aea735f88bdf09c /lib/CodeGen/CodeGenModule.h
parentee791dde723a2089c681d2ab6a9d4f96379d5f49 (diff)
downloadsrc-test2-5044f5c816adfd5cba17f1adee1a10127296d0bf.tar.gz
src-test2-5044f5c816adfd5cba17f1adee1a10127296d0bf.zip
Notes
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r--lib/CodeGen/CodeGenModule.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h
index c7aa7a47a836..81f39791fcd0 100644
--- a/lib/CodeGen/CodeGenModule.h
+++ b/lib/CodeGen/CodeGenModule.h
@@ -161,6 +161,9 @@ class CodeGenModule : public BlockModule {
/// strings. This value has type int * but is actually an Obj-C class pointer.
llvm::Constant *CFConstantStringClassRef;
+ /// Lazily create the Objective-C runtime
+ void createObjCRuntime();
+
llvm::LLVMContext &VMContext;
public:
CodeGenModule(ASTContext &C, const CodeGenOptions &CodeGenOpts,
@@ -174,7 +177,7 @@ public:
/// getObjCRuntime() - Return a reference to the configured
/// Objective-C runtime.
CGObjCRuntime &getObjCRuntime() {
- assert(Runtime && "No Objective-C runtime has been configured.");
+ if (!Runtime) createObjCRuntime();
return *Runtime;
}