Let TargetABI fix up LLVM mangles for more special symbols

For ModuleInfos, ModuleRefs, InterfaceInfos, interface vtables & thunks.
This commit is contained in:
Martin 2017-09-29 22:38:11 +02:00
parent 0b28925e9a
commit c9a3be1295
12 changed files with 134 additions and 79 deletions

View file

@ -834,7 +834,7 @@ void DtoResolveVariable(VarDeclaration *vd) {
if (gIR->dmodule) {
vd->ir->setInitialized();
}
std::string llName(getMangledName(vd));
const auto llMangle = DtoMangledName(vd);
// Since the type of a global must exactly match the type of its
// initializer, we cannot know the type until after we have emitted the
@ -855,7 +855,7 @@ void DtoResolveVariable(VarDeclaration *vd) {
llvm::GlobalVariable *gvar =
getOrCreateGlobal(vd->loc, gIR->module, DtoMemType(vd->type), isLLConst,
linkage, nullptr, llName, vd->isThreadlocal());
linkage, nullptr, llMangle, vd->isThreadlocal());
getIrGlobal(vd)->value = gvar;
// Set the alignment (it is important not to use type->alignsize because