[llvm-commits] CVS: llvm/lib/ExecutionEngine/ExecutionEngine.cpp

Chris Lattner lattner at cs.uiuc.edu
Sat Jan 31 19:08:01 PST 2004


Changes in directory llvm/lib/ExecutionEngine:

ExecutionEngine.cpp updated: 1.45 -> 1.46

---
Log message:

Print an error message if we can't materialize the bytecode file


---
Diffs of the changes:  (+11 -5)

Index: llvm/lib/ExecutionEngine/ExecutionEngine.cpp
diff -u llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.45 llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.46
--- llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.45	Wed Dec 31 14:21:04 2003
+++ llvm/lib/ExecutionEngine/ExecutionEngine.cpp	Sat Jan 31 19:07:25 2004
@@ -130,11 +130,17 @@
     EE = JIT::create(MP, IL);
 
   // If we can't make a JIT, make an interpreter instead.
-  try {
-    if (EE == 0)
-      EE = Interpreter::create(MP->materializeModule(), IL);
-  } catch (...) {
-    EE = 0;
+  if (EE == 0) {
+    try {
+      Module *M = MP->materializeModule();
+      try {
+        EE = Interpreter::create(M, IL);
+      } catch (...) {
+        std::cerr << "Error creating the interpreter!\n";
+      }
+    } catch (...) {
+      std::cerr << "Error reading the bytecode file!\n";
+    }
   }
 
   if (EE == 0) delete IL;





More information about the llvm-commits mailing list