diff options
author | Chris Lattner <sabre@nondot.org> | 2003-10-18 05:55:25 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-10-18 05:55:25 +0000 |
commit | fefd3bebc403859150546957bcdb7fb72254e714 (patch) | |
tree | 85a863b0e018c16e1329d3c0c60ea09ff837cab9 /llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | |
parent | 9d573474905c559e3b801e6f9d61ded4266f3e37 (diff) | |
download | llvm-fefd3bebc403859150546957bcdb7fb72254e714.zip llvm-fefd3bebc403859150546957bcdb7fb72254e714.tar.gz llvm-fefd3bebc403859150546957bcdb7fb72254e714.tar.bz2 |
Interpret the new varargs intrinsics correctly
llvm-svn: 9222
Diffstat (limited to 'llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp index b92e3c6..44ba87f 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp +++ b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp @@ -687,14 +687,12 @@ GenericValue lle_X_fprintf(FunctionType *M, const vector<GenericValue> &Args) { // LLVM Intrinsic Functions... //===----------------------------------------------------------------------===// -// void llvm.va_start(<va_list> *) - Implement the va_start operation... +// <va_list> llvm.va_start() - Implement the va_start operation... GenericValue llvm_va_start(FunctionType *F, const vector<GenericValue> &Args) { - assert(Args.size() == 1); - GenericValue *VAListP = (GenericValue *)GVTOP(Args[0]); + assert(Args.size() == 0); GenericValue Val; Val.UIntVal = 0; // Start at the first '...' argument... - TheInterpreter->StoreValueToMemory(Val, VAListP, Type::UIntTy); - return GenericValue(); + return Val; } // void llvm.va_end(<va_list> *) - Implement the va_end operation... @@ -703,13 +701,10 @@ GenericValue llvm_va_end(FunctionType *F, const vector<GenericValue> &Args) { return GenericValue(); // Noop! } -// void llvm.va_copy(<va_list> *, <va_list>) - Implement the va_copy -// operation... +// <va_list> llvm.va_copy(<va_list>) - Implement the va_copy operation... GenericValue llvm_va_copy(FunctionType *F, const vector<GenericValue> &Args) { - assert(Args.size() == 2); - GenericValue *DestVAList = (GenericValue*)GVTOP(Args[0]); - TheInterpreter->StoreValueToMemory(Args[1], DestVAList, Type::UIntTy); - return GenericValue(); + assert(Args.size() == 1); + return Args[0]; } } // End extern "C" |