diff options
author | David Chisnall <csdavec@swan.ac.uk> | 2010-01-23 02:40:42 +0000 |
---|---|---|
committer | David Chisnall <csdavec@swan.ac.uk> | 2010-01-23 02:40:42 +0000 |
commit | 0d13f6fdbdd6f06e2449b8834dda53334abd399a (patch) | |
tree | e7f01cb7e6327af8b755560e2cf6f040d14d0b0e /lib/CodeGen/CodeGenModule.h | |
parent | a18f1b88a7ef3d2c944bb1d3b6586a2860ce2baa (diff) |
Created __builtin___NSStringMakeConstantString() builtin, which generates constant Objective-C strings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94274 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | lib/CodeGen/CodeGenModule.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index c7aa7a47a8..81f39791fc 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; } |