mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-09 04:15:58 +03:00
Fix _d_invariant mangling on MinGW/Win32.
This is getting uglier and uglier, should probably just switch back to extern(C) irrespective of what upstream DMD does.
This commit is contained in:
parent
286770ed7b
commit
3556f52b95
2 changed files with 9 additions and 4 deletions
|
@ -915,12 +915,15 @@ static void LLVM_D_BuildRuntimeModule()
|
|||
// KLUDGE: _d_invariant is actually extern(D) in the upstream runtime, possibly
|
||||
// for more efficient parameter passing on x86. This complicates our code here
|
||||
// quite a bit, though.
|
||||
llvm::StringRef fname("_D9invariant12_d_invariantFC6ObjectZv");
|
||||
Parameters* params = new Parameters();
|
||||
params->push(new Parameter(STCin, ClassDeclaration::object->type, NULL, NULL));
|
||||
TypeFunction* dty = new TypeFunction(params, Type::tvoid, 0, LINKd);
|
||||
llvm::Function* fn = llvm::Function::Create(llvm::cast<llvm::FunctionType>(DtoType(dty)),
|
||||
llvm::GlobalValue::ExternalLinkage, fname, M);
|
||||
llvm::Function* fn = llvm::Function::Create(
|
||||
llvm::cast<llvm::FunctionType>(DtoType(dty)),
|
||||
llvm::GlobalValue::ExternalLinkage,
|
||||
gABI->mangleForLLVM("_D9invariant12_d_invariantFC6ObjectZv", LINKd),
|
||||
M
|
||||
);
|
||||
gABI->newFunctionType(dty);
|
||||
gABI->rewriteFunctionType(dty);
|
||||
gABI->doneWithFunctionType();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue