From f8f2afb8cc5f080b291faad678e0a256ea44d15f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 18 Oct 2001 21:55:32 +0000 Subject: Enhancements to pass argc & argv to main if required git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@909 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp') diff --git a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp index 7be3336c58..bcd584a6b5 100644 --- a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp +++ b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp @@ -110,9 +110,10 @@ GenericValue lle_X_print(MethodType *M, const vector &ArgVals) { GenericValue lle_X_printVal(MethodType *M, const vector &ArgVal) { assert(ArgVal.size() == 1 && "generic print only takes one argument!"); - // Specialize print([ubyte {x N} ] *) + // Specialize print([ubyte {x N} ] *) and print(sbyte *) if (PointerType *PTy = dyn_cast(M->getParamTypes()[0].get())) - if (const ArrayType *ATy = dyn_cast(PTy->getValueType())) { + if (PTy->getValueType() == Type::SByteTy || + isa(PTy->getValueType())) { return lle_VP_printstr(M, ArgVal); } @@ -132,4 +133,9 @@ GenericValue lle_VB_putchar(MethodType *M, const vector &Args) { return GenericValue(); } +// void "__main"() +GenericValue lle_V___main(MethodType *M, const vector &Args) { + return GenericValue(); +} + } // End extern "C" -- cgit v1.2.3-18-g5258