mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 00:23:14 +01:00
Replace assertion with errormessage for unsupported calling conventions. like Pascal. See dstress/run/e/extern_10_A.d
This commit is contained in:
@@ -417,7 +417,7 @@ llvm::Function* build_module_ctor()
|
||||
const llvm::FunctionType* fnTy = llvm::FunctionType::get(LLType::VoidTy,argsTy,false);
|
||||
assert(gIR->module->getFunction(name) == NULL);
|
||||
llvm::Function* fn = llvm::Function::Create(fnTy, llvm::GlobalValue::InternalLinkage, name, gIR->module);
|
||||
fn->setCallingConv(DtoCallingConv(LINKd));
|
||||
fn->setCallingConv(DtoCallingConv(0, LINKd));
|
||||
|
||||
llvm::BasicBlock* bb = llvm::BasicBlock::Create("entry", fn);
|
||||
IRBuilder<> builder(bb);
|
||||
@@ -432,7 +432,7 @@ llvm::Function* build_module_ctor()
|
||||
for (size_t i=0; i<n; i++) {
|
||||
llvm::Function* f = gIR->ctors[i]->ir.irFunc->func;
|
||||
llvm::CallInst* call = builder.CreateCall(f,"");
|
||||
call->setCallingConv(DtoCallingConv(LINKd));
|
||||
call->setCallingConv(DtoCallingConv(0, LINKd));
|
||||
}
|
||||
|
||||
// debug info end
|
||||
@@ -462,7 +462,7 @@ static llvm::Function* build_module_dtor()
|
||||
const llvm::FunctionType* fnTy = llvm::FunctionType::get(LLType::VoidTy,argsTy,false);
|
||||
assert(gIR->module->getFunction(name) == NULL);
|
||||
llvm::Function* fn = llvm::Function::Create(fnTy, llvm::GlobalValue::InternalLinkage, name, gIR->module);
|
||||
fn->setCallingConv(DtoCallingConv(LINKd));
|
||||
fn->setCallingConv(DtoCallingConv(0, LINKd));
|
||||
|
||||
llvm::BasicBlock* bb = llvm::BasicBlock::Create("entry", fn);
|
||||
IRBuilder<> builder(bb);
|
||||
@@ -477,7 +477,7 @@ static llvm::Function* build_module_dtor()
|
||||
for (size_t i=0; i<n; i++) {
|
||||
llvm::Function* f = gIR->dtors[i]->ir.irFunc->func;
|
||||
llvm::CallInst* call = builder.CreateCall(f,"");
|
||||
call->setCallingConv(DtoCallingConv(LINKd));
|
||||
call->setCallingConv(DtoCallingConv(0, LINKd));
|
||||
}
|
||||
|
||||
// debug info end
|
||||
@@ -507,7 +507,7 @@ static llvm::Function* build_module_unittest()
|
||||
const llvm::FunctionType* fnTy = llvm::FunctionType::get(LLType::VoidTy,argsTy,false);
|
||||
assert(gIR->module->getFunction(name) == NULL);
|
||||
llvm::Function* fn = llvm::Function::Create(fnTy, llvm::GlobalValue::InternalLinkage, name, gIR->module);
|
||||
fn->setCallingConv(DtoCallingConv(LINKd));
|
||||
fn->setCallingConv(DtoCallingConv(0, LINKd));
|
||||
|
||||
llvm::BasicBlock* bb = llvm::BasicBlock::Create("entry", fn);
|
||||
IRBuilder<> builder(bb);
|
||||
@@ -522,7 +522,7 @@ static llvm::Function* build_module_unittest()
|
||||
for (size_t i=0; i<n; i++) {
|
||||
llvm::Function* f = gIR->unitTests[i]->ir.irFunc->func;
|
||||
llvm::CallInst* call = builder.CreateCall(f,"");
|
||||
call->setCallingConv(DtoCallingConv(LINKd));
|
||||
call->setCallingConv(DtoCallingConv(0, LINKd));
|
||||
}
|
||||
|
||||
// debug info end
|
||||
|
||||
Reference in New Issue
Block a user