[llvm-commits] [llvm] r82100 - /llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
Chris Lattner
clattner at apple.com
Thu Sep 17 09:46:29 PDT 2009
On Sep 16, 2009, at 5:14 PM, Daniel Dunbar wrote:
> Author: ddunbar
> Date: Wed Sep 16 19:14:44 2009
> New Revision: 82100
>
> URL: http://llvm.org/viewvc/llvm-project?rev=82100&view=rev
> Log:
> Some platforms may need malloc.h for alloca.
this isn't portable, can the code use smallvector instead of alloca?
-Chris
>
> Modified:
> llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
>
> Modified: llvm/trunk/lib/ExecutionEngine/Interpreter/
> ExternalFunctions.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp?rev=82100&r1=82099&r2=82100&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
> (original)
> +++ llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
> Wed Sep 16 19:14:44 2009
> @@ -33,6 +33,10 @@
> #include <map>
> #include <cmath>
> #include <cstring>
> +// Some platforms may need malloc.h for alloca.
> +#ifdef HAVE_MALLOC_H
> +#include <malloc.h>
> +#endif
>
> #ifdef HAVE_FFI_CALL
> #ifdef HAVE_FFI_H
> @@ -269,7 +273,7 @@
> } else {
> RawFn = RF->second;
> }
> -
> +
> FunctionsLock->release();
>
> GenericValue Result;
> @@ -334,7 +338,7 @@
>
> // printf should return # chars printed. This is completely
> incorrect, but
> // close enough for now.
> - GenericValue GV;
> + GenericValue GV;
> GV.IntVal = APInt(32, strlen(FmtStr));
> while (1) {
> switch (*FmtStr) {
> @@ -566,4 +570,3 @@
> FuncNames["lle_X_scanf"] = lle_X_scanf;
> FuncNames["lle_X_fprintf"] = lle_X_fprintf;
> }
> -
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list