diff gen/toir.cpp @ 918:a4fcc13da3cd

Changed templates and typeinfo to use linkonce linkage instead of weak linkage, this should fix inlining problems, fixing bug #197 . If problems show up, it's easy to change it back by changing the define in mars.h . I'm 95% sure this is safe, given how we handle templates.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Mon, 02 Feb 2009 01:44:51 +0100
parents a69941a2c470
children 545f54041d91
line wrap: on
line diff
--- a/gen/toir.cpp	Mon Feb 02 00:58:36 2009 +0100
+++ b/gen/toir.cpp	Mon Feb 02 01:44:51 2009 +0100
@@ -391,7 +391,7 @@
     else
     assert(0);
 
-    llvm::GlobalValue::LinkageTypes _linkage = llvm::GlobalValue::InternalLinkage;//WeakLinkage;
+    llvm::GlobalValue::LinkageTypes _linkage = llvm::GlobalValue::InternalLinkage;
     if (Logger::enabled())
         Logger::cout() << "type: " << *at << "\ninit: " << *_init << '\n';
     llvm::GlobalVariable* gvar = new llvm::GlobalVariable(at,true,_linkage,_init,".str",gIR->module);
@@ -467,7 +467,7 @@
         return _init;
     }
 
-    llvm::GlobalValue::LinkageTypes _linkage = llvm::GlobalValue::InternalLinkage;//WeakLinkage;
+    llvm::GlobalValue::LinkageTypes _linkage = llvm::GlobalValue::InternalLinkage;
     llvm::GlobalVariable* gvar = new llvm::GlobalVariable(_init->getType(),true,_linkage,_init,".str",gIR->module);
 
     llvm::ConstantInt* zero = llvm::ConstantInt::get(LLType::Int32Ty, 0, false);