1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Abort when the user program calls abort, instead of printing a funny message and calling exit(1).

llvm-svn: 9716
This commit is contained in:
Brian Gaeke 2003-11-05 01:18:49 +00:00
parent fd8ec07a8e
commit ee15c93eda

View File

@ -28,6 +28,7 @@
#include "Config/dlfcn.h" #include "Config/dlfcn.h"
#include "Config/link.h" #include "Config/link.h"
#include <cmath> #include <cmath>
#include <csignal>
#include <map> #include <map>
using std::vector; using std::vector;
@ -142,10 +143,7 @@ GenericValue lle_X_exit(FunctionType *M, const vector<GenericValue> &Args) {
// void abort(void) // void abort(void)
GenericValue lle_X_abort(FunctionType *M, const vector<GenericValue> &Args) { GenericValue lle_X_abort(FunctionType *M, const vector<GenericValue> &Args) {
std::cerr << "***PROGRAM ABORTED***!\n"; raise (SIGABRT);
GenericValue GV;
GV.IntVal = 1;
TheInterpreter->exitCalled(GV);
return GenericValue(); return GenericValue();
} }