mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-15 23:57:48 +00:00
assert early instead of late for unimplemented feature
llvm-svn: 6050
This commit is contained in:
parent
78f5953056
commit
35b3a10cf3
@ -81,10 +81,17 @@ void *VM::getPointerToFunction(const Function *F) {
|
||||
if (F->isExternal())
|
||||
return Addr = getPointerToNamedFunction(F->getName());
|
||||
|
||||
// JIT all of the functions in the module. Eventually this will JIT functions
|
||||
// on demand. This has the effect of populating all of the non-external
|
||||
// functions into the GlobalAddress table.
|
||||
static bool isAlreadyCodeGenerating = false;
|
||||
if (isAlreadyCodeGenerating) {
|
||||
assert(0 && "Recursive function stubs not handled yet!");
|
||||
}
|
||||
|
||||
// FIXME: JIT all of the functions in the module. Eventually this will JIT
|
||||
// functions on demand. This has the effect of populating all of the
|
||||
// non-external functions into the GlobalAddress table.
|
||||
isAlreadyCodeGenerating = true;
|
||||
PM.run(getModule());
|
||||
isAlreadyCodeGenerating = false;
|
||||
|
||||
assert(Addr && "Code generation didn't add function to GlobalAddress table!");
|
||||
return Addr;
|
||||
|
Loading…
Reference in New Issue
Block a user