diff options
| author | Chris Lattner <sabre@nondot.org> | 2003-05-08 21:08:43 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2003-05-08 21:08:43 +0000 |
| commit | 974e1d8ec24cb12fc3e2a0cf8bfd192d89e1b5e6 (patch) | |
| tree | d6c514bf700cb85413d4e7d98763b53fc20a8eaf /llvm/lib | |
| parent | 93c8eddd75c684db37912fc1f797dd9f6e4f2e73 (diff) | |
| download | bcm5719-llvm-974e1d8ec24cb12fc3e2a0cf8bfd192d89e1b5e6.tar.gz bcm5719-llvm-974e1d8ec24cb12fc3e2a0cf8bfd192d89e1b5e6.zip | |
assert early instead of late for unimplemented feature
llvm-svn: 6050
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/ExecutionEngine/JIT/VM.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/VM.cpp b/llvm/lib/ExecutionEngine/JIT/VM.cpp index c107438f0f2..836e00e4fa8 100644 --- a/llvm/lib/ExecutionEngine/JIT/VM.cpp +++ b/llvm/lib/ExecutionEngine/JIT/VM.cpp @@ -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; |

