summaryrefslogtreecommitdiff
path: root/tools/lli
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-01-07 06:43:08 +0000
committerChris Lattner <sabre@nondot.org>2007-01-07 06:43:08 +0000
commitf74edf28b6a23d156aeb93750adfe301cdd851cc (patch)
tree4bfe1c2be5f6cda9a10a9f0977868b611f290774 /tools/lli
parent32ff92d924c1d0f0dfbc1d246484d8e7341f1eb1 (diff)
downloadllvm-f74edf28b6a23d156aeb93750adfe301cdd851cc.tar.gz
llvm-f74edf28b6a23d156aeb93750adfe301cdd851cc.tar.bz2
llvm-f74edf28b6a23d156aeb93750adfe301cdd851cc.tar.xz
this is an overcomplex way to call exit :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32978 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lli')
-rw-r--r--tools/lli/lli.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp
index 5b139bff1a..998e761681 100644
--- a/tools/lli/lli.cpp
+++ b/tools/lli/lli.cpp
@@ -118,18 +118,7 @@ int main(int argc, char **argv, char * const *envp) {
// 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) {