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
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 @@
// 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();
}