diff options
author | Chris Lattner <sabre@nondot.org> | 2002-05-20 21:17:16 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-05-20 21:17:16 +0000 |
commit | 1ee34a5a5ba52557697e7eb607e8bd5d4ce0d492 (patch) | |
tree | e4bcfbfb5c42058c7d362210d6cbae5acadc6297 /lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | |
parent | 0fe380c683a41f0fa281901132e853eda4e1ab38 (diff) |
Remove explicit support for tracing code. It should be linked into the
executable just like everything else.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2674 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp')
-rw-r--r-- | lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | 53 |
1 files changed, 10 insertions, 43 deletions
diff --git a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp index efe2e8fe32..a16f31718e 100644 --- a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp +++ b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp @@ -12,7 +12,6 @@ #include "Interpreter.h" #include "llvm/DerivedTypes.h" -#include "../test/Libraries/libinstr/tracelib.h" #include <map> #include <dlfcn.h> #include <iostream> @@ -205,6 +204,15 @@ GenericValue lle_X_exit(FunctionType *M, const vector<GenericValue> &Args) { return GenericValue(); } +// 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); + return GenericValue(); +} + // void *malloc(uint) GenericValue lle_X_malloc(FunctionType *M, const vector<GenericValue> &Args) { assert(Args.size() == 1 && "Malloc expects one argument!"); @@ -459,43 +467,6 @@ GenericValue lle_X_fflush(FunctionType *M, const vector<GenericValue> &Args) { return GV; } -// unsigned int HashPointerToSeqNum(char* ptr) -GenericValue lle_X_HashPointerToSeqNum(FunctionType *M, const vector<GenericValue> &Args) { - assert(Args.size() == 1); - GenericValue GV; - - GV.UIntVal = HashPointerToSeqNum((char*) Args[0].PointerVal); - return GV; -} - -// void ReleasePointerSeqNum(char* ptr); -GenericValue lle_X_ReleasePointerSeqNum(FunctionType *M, const vector<GenericValue> &Args) { - assert(Args.size() == 1); - ReleasePointerSeqNum((char*) Args[0].PointerVal); - return GenericValue(); -} - -// void RecordPointer(char* ptr); -GenericValue lle_X_RecordPointer(FunctionType *M, const vector<GenericValue> &Args) { - assert(Args.size() == 1); - RecordPointer((char*) Args[0].PointerVal); - return GenericValue(); -} - -// void PushPointerSet(); -GenericValue lle_X_PushPointerSet(FunctionType *M, const vector<GenericValue> &Args) { - assert(Args.size() == 0); - PushPointerSet(); - return GenericValue(); -} - -// void ReleaseRecordedPointers(); -GenericValue lle_X_ReleasePointersPopSet(FunctionType *M, const vector<GenericValue> &Args) { - assert(Args.size() == 0); - ReleasePointersPopSet(); - return GenericValue(); -} - } // End extern "C" @@ -520,6 +491,7 @@ void Interpreter::initializeExternalMethods() { FuncNames["lle_VB_putchar"] = lle_VB_putchar; FuncNames["lle_V___main"] = lle_V___main; FuncNames["lle_X_exit"] = lle_X_exit; + FuncNames["lle_X_abort"] = lle_X_abort; FuncNames["lle_X_malloc"] = lle_X_malloc; FuncNames["lle_X_free"] = lle_X_free; FuncNames["lle_X_atoi"] = lle_X_atoi; @@ -542,9 +514,4 @@ void Interpreter::initializeExternalMethods() { FuncNames["lle_X_fwrite"] = lle_X_fwrite; FuncNames["lle_X_fgets"] = lle_X_fgets; FuncNames["lle_X_fflush"] = lle_X_fflush; - FuncNames["lle_X_HashPointerToSeqNum"] = lle_X_HashPointerToSeqNum; - FuncNames["lle_X_ReleasePointerSeqNum"] = lle_X_ReleasePointerSeqNum; - FuncNames["lle_X_RecordPointer"] = lle_X_RecordPointer; - FuncNames["lle_X_PushPointerSet"] = lle_X_PushPointerSet; - FuncNames["lle_X_ReleasePointersPopSet"] = lle_X_ReleasePointersPopSet; } |