Replace assertion with errormessage for unsupported calling conventions. like Pascal. See dstress/run/e/extern_10_A.d

This commit is contained in:
Tomas Lindquist Olsen
2009-02-04 00:04:09 +01:00
parent 280be5ef8e
commit bd4f7ec731
4 changed files with 14 additions and 11 deletions

View File

@@ -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