aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2003-11-05 01:18:49 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2003-11-05 01:18:49 +0000
commitb56a6bc96a483b47da71b24efaa4380d463bbe17 (patch)
treeebb339785c96fdd527f3e1978191b1a8b91f3a49 /lib
parentd65460f133f392953492888201afe06dce84ee8e (diff)
downloadexternal_llvm-b56a6bc96a483b47da71b24efaa4380d463bbe17.zip
external_llvm-b56a6bc96a483b47da71b24efaa4380d463bbe17.tar.gz
external_llvm-b56a6bc96a483b47da71b24efaa4380d463bbe17.tar.bz2
Abort when the user program calls abort, instead of printing a funny message and calling exit(1).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9716 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
index b2c21e1..ecf19c2 100644
--- a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
+++ b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
@@ -28,6 +28,7 @@
#include "Config/dlfcn.h"
#include "Config/link.h"
#include <cmath>
+#include <csignal>
#include <map>
using std::vector;
@@ -142,10 +143,7 @@ GenericValue lle_X_exit(FunctionType *M, const vector<GenericValue> &Args) {
// void abort(void)
GenericValue lle_X_abort(FunctionType *M, const vector<GenericValue> &Args) {
- std::cerr << "***PROGRAM ABORTED***!\n";
- GenericValue GV;
- GV.IntVal = 1;
- TheInterpreter->exitCalled(GV);
+ raise (SIGABRT);
return GenericValue();
}