From 9c28c0263a4118979c395fd73568331874bb230a Mon Sep 17 00:00:00 2001 From: Tomas Lindquist Olsen Date: Thu, 10 Jul 2008 00:13:09 +0200 Subject: [PATCH] [svn r345] Fixed the new moduleinfo stuff to have consistent symbol names with the D style. --- gen/toobj.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gen/toobj.cpp b/gen/toobj.cpp index acebb956..9a7ec328 100644 --- a/gen/toobj.cpp +++ b/gen/toobj.cpp @@ -306,7 +306,8 @@ static LLFunction* build_module_reference_and_ctor(LLConstant* moduleinfo) const LLFunctionType* fty = LLFunctionType::get(LLType::VoidTy, std::vector(), 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 @@ static LLFunction* build_module_reference_and_ctor(LLConstant* moduleinfo) 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);