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

@@ -52,8 +52,7 @@ TypeFunction* DtoTypeFunction(DValue* fnval)
return static_cast<TypeFunction*>(next);
}
assert(0 && "cant get TypeFunction* from non lazy/function/delegate");
return 0;
llvm_unreachable("Cannot get TypeFunction* from non lazy/function/delegate");
}
//////////////////////////////////////////////////////////////////////////////////////////
@@ -123,11 +122,8 @@ LLValue* DtoCallableValue(DValue* fn)
return gIR->ir->CreateExtractValue(dg, 1, ".funcptr");
}
}
else
{
assert(0 && "not a callable type");
return NULL;
}
llvm_unreachable("Not a callable type.");
}
//////////////////////////////////////////////////////////////////////////////////////////