summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitb30f735cf3fa9b2cb69b3382c1f0c3ae1c7bcd26 (patch)
tree4ee27db5e50b0eb013761a7807e5e5806810eec7 /llvm/lib/ExecutionEngine/JIT/JIT.cpp
parenta41def58011943f1e8084084b239b908d4986e94 (diff)
downloadbcm5719-llvm-b30f735cf3fa9b2cb69b3382c1f0c3ae1c7bcd26.tar.gz
bcm5719-llvm-b30f735cf3fa9b2cb69b3382c1f0c3ae1c7bcd26.zip
Adapt to new interface function materialization interface
llvm-svn: 29051
Diffstat (limited to 'llvm/lib/ExecutionEngine/JIT/JIT.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/JIT/JIT.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp
index 7cb5a37ed67..2bf0e13baf4 100644
--- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/llvm/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());
OpenPOWER on IntegriCloud