Use llvm_unreachable instead of assert(0).

Also removed some unused functions.
This commit is contained in:
David Nadlinger 2013-02-07 03:38:15 +01:00
parent 28a65ff689
commit 8ff3a8060a
18 changed files with 68 additions and 166 deletions

View file

@ -89,11 +89,7 @@ llvm::Function* LLVM_D_GetRuntimeFunction(llvm::Module* target, const char* name
return fn;
fn = M->getFunction(name);
if (!fn) {
printf("Runtime function '%s' was not found\n", name);
assert(0);
//return NULL;
}
assert(fn && "Runtime function not found.");
LLFunctionType* fnty = fn->getFunctionType();
LLFunction* resfn = llvm::cast<llvm::Function>(target->getOrInsertFunction(name, fnty));