changeset 324:c542d12017e5 trunk

[svn r345] Fixed the new moduleinfo stuff to have consistent symbol names with the D style.
author lindquist
date Thu, 10 Jul 2008 00:13:09 +0200
parents 0d52412d5b1a
children 3c8c58c24aa8
files gen/toobj.cpp
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gen/toobj.cpp	Wed Jul 09 23:43:51 2008 +0200
+++ b/gen/toobj.cpp	Thu Jul 10 00:13:09 2008 +0200
@@ -306,7 +306,8 @@
     const LLFunctionType* fty = LLFunctionType::get(LLType::VoidTy, std::vector<const LLType*>(), false);
 
     // build ctor name
-    std::string fname = gIR->dmodule->mangle();
+    std::string fname = "_D";
+    fname += gIR->dmodule->mangle();
     fname += "16__moduleinfoCtorZ";
 
     // build a function that registers the moduleinfo in the global moduleinfo linked list
@@ -320,7 +321,8 @@
     LLConstant* thismrefinit = LLConstantStruct::get(modulerefTy, mrefvalues);
 
     // create the ModuleReference node for this module
-    std::string thismrefname = gIR->dmodule->mangle();
+    std::string thismrefname = "_D";
+    thismrefname += gIR->dmodule->mangle();
     thismrefname += "11__moduleRefZ";
     LLGlobalVariable* thismref = new LLGlobalVariable(modulerefTy, false, LLGlobalValue::InternalLinkage, thismrefinit, thismrefname, gIR->module);