From ad05662ae05336aa5db20f9d34d5c1d5bba9d6c2 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sat, 23 Aug 2008 16:34:08 +0200 Subject: Make compilers pluggable at runtime. --- MLKLLVMCompiler.mm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'MLKLLVMCompiler.mm') 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"); -- cgit v1.2.3