mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-02 02:23:13 +01:00
Allow multiple declarations to share the same mangled name/LLVM global.
This is necessary to enable aliasing compiler-generated symbols with pragma(mangle, …). Note that globals for internal use are still directly created.
This commit is contained in:
@@ -86,7 +86,7 @@ void RTTIBuilder::push_void_array(llvm::Constant* CI, Type* valtype, Dsymbol* ma
|
||||
std::string initname(mangle_sym->mangle());
|
||||
initname.append(".rtti.voidarr.data");
|
||||
|
||||
LLGlobalVariable* G = new llvm::GlobalVariable(
|
||||
LLGlobalVariable* G = new LLGlobalVariable(
|
||||
*gIR->module, CI->getType(), true, TYPEINFO_LINKAGE_TYPE, CI, initname);
|
||||
G->setAlignment(valtype->alignsize());
|
||||
|
||||
@@ -105,7 +105,7 @@ void RTTIBuilder::push_array(llvm::Constant * CI, uint64_t dim, Type* valtype, D
|
||||
initname.append(tmpStr);
|
||||
initname.append(".data");
|
||||
|
||||
LLGlobalVariable* G = new llvm::GlobalVariable(
|
||||
LLGlobalVariable* G = new LLGlobalVariable(
|
||||
*gIR->module, CI->getType(), true, TYPEINFO_LINKAGE_TYPE, CI, initname);
|
||||
G->setAlignment(valtype->alignsize());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user