diff gen/runtime.c @ 57:a9d29e9f1fed trunk

[svn r61] Added support for D-style variadic functions :)
author lindquist
date Thu, 25 Oct 2007 02:39:53 +0200
parents 0c77619e803b
children
line wrap: on
line diff
--- a/gen/runtime.c	Wed Oct 24 22:26:37 2007 +0200
+++ b/gen/runtime.c	Thu Oct 25 02:39:53 2007 +0200
@@ -92,6 +92,11 @@
     // TODO maybe check the target module first, to allow overriding the runtime on a pre module basis?
     // could be done and seems like it could be neat too :)
 
+    llvm::GlobalVariable* gv = target->getNamedGlobal(name);
+    if (gv) {
+        return gv;
+    }
+
     if (global.params.noruntime) {
         error("No implicit runtime calls allowed with -noruntime option enabled");
         fatal();