summaryrefslogtreecommitdiff
path: root/MLKLLVMCompiler.mm
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-08-23 16:34:08 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-08-23 16:34:08 +0200
commitad05662ae05336aa5db20f9d34d5c1d5bba9d6c2 (patch)
tree14c0f6321acb8532a3a3d92a957404dfa1f66ee8 /MLKLLVMCompiler.mm
parent13dc1ca7ca1d785313517b9f8d78e63414cb43df (diff)
Make compilers pluggable at runtime.
Diffstat (limited to 'MLKLLVMCompiler.mm')
-rw-r--r--MLKLLVMCompiler.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm
index aa0ab79..4b63a89 100644
--- a/MLKLLVMCompiler.mm
+++ b/MLKLLVMCompiler.mm
@@ -76,6 +76,15 @@ static Constant
@implementation MLKLLVMCompiler
++(void) load
+{
+ if (!MLKDefaultCompiler)
+ {
+ MLKDefaultCompiler = self;
+ MLKLoadCompilesP = YES;
+ }
+}
+
+(void) initialize
{
module = new llvm::Module ("MLKLLVMModule");