[llvm-commits] CVS: llvm/tools/lli/lli.cpp

Chris Lattner sabre at nondot.org
Sat Jan 6 22:43:23 PST 2007



Changes in directory llvm/tools/lli:

lli.cpp updated: 1.63 -> 1.64
---
Log message:

this is an overcomplex way to call exit :)


---
Diffs of the changes:  (+1 -12)

 lli.cpp |   13 +------------
 1 files changed, 1 insertion(+), 12 deletions(-)


Index: llvm/tools/lli/lli.cpp
diff -u llvm/tools/lli/lli.cpp:1.63 llvm/tools/lli/lli.cpp:1.64
--- llvm/tools/lli/lli.cpp:1.63	Sun Dec 31 00:02:26 2006
+++ llvm/tools/lli/lli.cpp	Sun Jan  7 00:43:08 2007
@@ -118,18 +118,7 @@
     // Run static destructors.
     EE->runStaticConstructorsDestructors(true);
     
-    // If the program didn't explicitly call exit, call exit now, for the
-    // program. This ensures that any atexit handlers get called correctly.
-    Function *Exit = MP->getModule()->getOrInsertFunction("exit", Type::VoidTy,
-                                                          Type::Int32Ty,
-                                                          (Type *)0);
-
-    std::vector<GenericValue> Args;
-    GenericValue ResultGV;
-    ResultGV.Int32Val = Result;
-    Args.push_back(ResultGV);
-    EE->runFunction(Exit, Args);
-
+    exit(Result);
     std::cerr << "ERROR: exit(" << Result << ") returned!\n";
     abort();
   } catch (const std::string& msg) {






More information about the llvm-commits mailing list