summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-08-11 18:12:00 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-08-11 18:12:00 +0000
commit8d480594cf8405215f888454141dce10f84748db (patch)
treef5a701e7b295a59ad88a4fb548e4a76262f5f225 /clang/lib/CodeGen/CodeGenModule.h
parentf69d13b60af2a8b43acf453fa0f9dcc8e01b3203 (diff)
downloadbcm5719-llvm-8d480594cf8405215f888454141dce10f84748db.tar.gz
bcm5719-llvm-8d480594cf8405215f888454141dce10f84748db.zip
Change CodeGenModule to only create ObjC runtime for ObjC files
- Changed CodeGenModule::getObjCRuntime to return reference. - Added CodeGenModule::hasObjCRuntime predicate. llvm-svn: 54645
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index bd45f6580f0..0b313c42052 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -111,8 +111,18 @@ public:
/// Release - Finalize LLVM code generation.
void Release();
+
+ /// getObjCRuntime() - Return a reference to the configured
+ /// Objective-C runtime.
+ CGObjCRuntime &getObjCRuntime() {
+ assert(Runtime && "No Objective-C runtime has been configured.");
+ return *Runtime;
+ }
- CGObjCRuntime *getObjCRuntime() { return Runtime; }
+ /// hasObjCRuntime() - Return true iff an Objective-C runtime has
+ /// been configured.
+ bool hasObjCRuntime() { return !!Runtime; }
+
CGDebugInfo *getDebugInfo() { return DebugInfo; }
ASTContext &getContext() const { return Context; }
const LangOptions &getLangOptions() const { return Features; }
OpenPOWER on IntegriCloud