mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-20 06:43:14 +01:00
_d_hidden_func needs a parameter.
The DMD implementation is a bit odd. A parameter is passed to the function but the function itself is declared without a parameter. Then inline assembly is required to retrieve the parameter. Just do the same as gdc: declare the passed parameter.
This commit is contained in:
@@ -936,10 +936,11 @@ static void LLVM_D_BuildRuntimeModule()
|
||||
fn->setCallingConv(gABI->callingConv(LINKd));
|
||||
}
|
||||
|
||||
// void _d_hidden_func()
|
||||
// void _d_hidden_func(Object o)
|
||||
{
|
||||
llvm::StringRef fname("_d_hidden_func");
|
||||
LLFunctionType* fty = llvm::FunctionType::get(voidTy, false);
|
||||
LLType *types[] = { voidPtrTy };
|
||||
LLFunctionType* fty = llvm::FunctionType::get(voidTy, types, false);
|
||||
llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user