aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-11-03 10:15:32 +0000
committerChris Lattner <sabre@nondot.org>2001-11-03 10:15:32 +0000
commit0f279b245dc5f84a6b7c89900fd0d48e324452e7 (patch)
treef5bc76b6fd8c8d25d3c8651bed9999a7ab6c14ea /lib/ExecutionEngine
parent055c963f5888bd7dc6241f84791abf2146df06d6 (diff)
downloadexternal_llvm-0f279b245dc5f84a6b7c89900fd0d48e324452e7.zip
external_llvm-0f279b245dc5f84a6b7c89900fd0d48e324452e7.tar.gz
external_llvm-0f279b245dc5f84a6b7c89900fd0d48e324452e7.tar.bz2
Be lenient on types so that programs that are not very typesafe will work
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1104 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r--lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
index a6a75f6..769c75e 100644
--- a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
+++ b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
@@ -192,13 +192,13 @@ GenericValue lle_V___main(MethodType *M, const vector<GenericValue> &Args) {
}
// void "exit"(int)
-GenericValue lle_Vi_exit(MethodType *M, const vector<GenericValue> &Args) {
+GenericValue lle_X_exit(MethodType *M, const vector<GenericValue> &Args) {
TheInterpreter->exitCalled(Args[0]);
return GenericValue();
}
// void *malloc(uint)
-GenericValue lle_PI_malloc(MethodType *M, const vector<GenericValue> &Args) {
+GenericValue lle_X_malloc(MethodType *M, const vector<GenericValue> &Args) {
assert(Args.size() == 1 && "Malloc expects one argument!");
GenericValue GV;
GV.PointerVal = (uint64_t)malloc(Args[0].UIntVal);
@@ -206,13 +206,13 @@ GenericValue lle_PI_malloc(MethodType *M, const vector<GenericValue> &Args) {
}
// void free(void *)
-GenericValue lle_VP_free(MethodType *M, const vector<GenericValue> &Args) {
+GenericValue lle_X_free(MethodType *M, const vector<GenericValue> &Args) {
free((void*)Args[0].PointerVal);
return GenericValue();
}
// double pow(double, double)
-GenericValue lle_DDD_pow(MethodType *M, const vector<GenericValue> &Args) {
+GenericValue lle_X_pow(MethodType *M, const vector<GenericValue> &Args) {
GenericValue GV;
GV.DoubleVal = pow(Args[0].DoubleVal, Args[1].DoubleVal);
return GV;
@@ -220,7 +220,7 @@ GenericValue lle_DDD_pow(MethodType *M, const vector<GenericValue> &Args) {
// int printf(sbyte *, ...) - a very rough implementation to make output useful.
-GenericValue lle_iP_printf(MethodType *M, const vector<GenericValue> &Args) {
+GenericValue lle_X_printf(MethodType *M, const vector<GenericValue> &Args) {
const char *FmtStr = (const char *)Args[0].PointerVal;
unsigned ArgNo = 1;
@@ -292,13 +292,13 @@ void Interpreter::initializeExternalMethods() {
FuncNames["lle_X_printFloat"] = lle_X_printFloat;
FuncNames["lle_X_printDouble"] = lle_X_printDouble;
FuncNames["lle_X_printPointer"] = lle_X_printPointer;
- FuncNames["lle_Vb_putchar"] = lle_Vb_putchar;
- FuncNames["lle_ii_putchar"] = lle_ii_putchar;
- FuncNames["lle_VB_putchar"] = lle_VB_putchar;
- FuncNames["lle_V___main"] = lle_V___main;
- FuncNames["lle_Vi_exit"] = lle_Vi_exit;
- FuncNames["lle_PI_malloc"] = lle_PI_malloc;
- FuncNames["lle_VP_free"] = lle_VP_free;
- FuncNames["lle_DDD_pow"] = lle_DDD_pow;
- FuncNames["lle_iP_printf"] = lle_iP_printf;
+ FuncNames["lle_Vb_putchar"] = lle_Vb_putchar;
+ FuncNames["lle_ii_putchar"] = lle_ii_putchar;
+ FuncNames["lle_VB_putchar"] = lle_VB_putchar;
+ FuncNames["lle_V___main"] = lle_V___main;
+ FuncNames["lle_X_exit"] = lle_X_exit;
+ FuncNames["lle_X_malloc"] = lle_X_malloc;
+ FuncNames["lle_X_free"] = lle_X_free;
+ FuncNames["lle_X_pow"] = lle_X_pow;
+ FuncNames["lle_X_printf"] = lle_X_printf;
}