Fixed issue with runtime supplied typeinfo generating multiple symbols.

Added new ldc.llvmasm import in runtime cmake file.
This commit is contained in:
Tomas Lindquist Olsen 2009-03-28 09:45:33 +01:00
parent 740cdaa588
commit 14b8aff809
2 changed files with 8 additions and 2 deletions

View file

@ -289,8 +289,13 @@ void DtoResolveTypeInfo(TypeInfoDeclaration* tid)
LOG_SCOPE; LOG_SCOPE;
IrGlobal* irg = new IrGlobal(tid); IrGlobal* irg = new IrGlobal(tid);
irg->value = new llvm::GlobalVariable(irg->type.get(), true,
TYPEINFO_LINKAGE_TYPE, NULL, tid->mangle(), gIR->module); std::string mangle(tid->mangle());
irg->value = gIR->module->getGlobalVariable(mangle);
if (!irg->value)
irg->value = new llvm::GlobalVariable(irg->type.get(), true,
TYPEINFO_LINKAGE_TYPE, NULL, mangle, gIR->module);
tid->ir.irGlobal = irg; tid->ir.irGlobal = irg;

View file

@ -44,6 +44,7 @@ if(D_VERSION EQUAL 1)
endmacro(imports_file) endmacro(imports_file)
imports_file(import/ldc/cstdarg.di) imports_file(import/ldc/cstdarg.di)
imports_file(import/ldc/intrinsics.di) imports_file(import/ldc/intrinsics.di)
imports_file(internal/ldc/llvmasm.di)
imports_file(internal/ldc/bitmanip.d) imports_file(internal/ldc/bitmanip.d)
imports_file(internal/ldc/vararg.d) imports_file(internal/ldc/vararg.d)
# library names # library names