[llvm-commits] [llvm] r82100 - /llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp

Daniel Dunbar daniel at zuster.org
Wed Sep 16 17:14:45 PDT 2009


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.

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;
 }
-





More information about the llvm-commits mailing list