aboutsummaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/JIT/JIT.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-07-07 17:18:09 +0000
committerChris Lattner <sabre@nondot.org>2006-07-07 17:18:09 +0000
commit5c72a3ae106d8d1dd6aa7e573948dac4102aca7b (patch)
tree32e3e781caf614e4843f87de8a1cd14ad6c1f4da /lib/ExecutionEngine/JIT/JIT.cpp
parent17aa9d3f53d0afe6a5188fd5f76f0738cb7e6a07 (diff)
Adapt to new interface function materialization interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29051 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT/JIT.cpp')
-rw-r--r--lib/ExecutionEngine/JIT/JIT.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp
index 7cb5a37ed6..2bf0e13baf 100644
--- a/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/lib/ExecutionEngine/JIT/JIT.cpp
@@ -256,18 +256,14 @@ void *JIT::getPointerToFunction(Function *F) {
return Addr; // Check if function already code gen'd
// Make sure we read in the function if it exists in this Module
- if (F->hasNotBeenReadFromBytecode())
- try {
- MP->materializeFunction(F);
- } catch ( std::string& errmsg ) {
+ if (F->hasNotBeenReadFromBytecode()) {
+ std::string ErrorMsg;
+ if (MP->materializeFunction(F, &ErrorMsg)) {
std::cerr << "Error reading function '" << F->getName()
- << "' from bytecode file: " << errmsg << "\n";
- abort();
- } catch (...) {
- std::cerr << "Error reading function '" << F->getName()
- << "from bytecode file!\n";
+ << "' from bytecode file: " << ErrorMsg << "\n";
abort();
}
+ }
if (F->isExternal()) {
void *Addr = getPointerToNamedFunction(F->getName());