Add a generic expansion transform: A op (B op' C) -> (A op B) op' (A op C)
[oota-llvm.git] / tools / llvm-stub / llvm-stub.c
index 125fba939a59747ddf4d54f4658ad883d8043f1c..31c2d09c6b7eb8f20b08d40ef7b6a3ff5094d37e 100644 (file)
@@ -1,10 +1,10 @@
 /*===- llvm-stub.c - Stub executable to run llvm bitcode files ------------===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file is distributed under the University of Illinois Open Source
 // License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This tool is used by the gccld program to enable transparent execution of
@@ -64,7 +64,11 @@ int main(int argc, char** argv) {
   memcpy((char **)Args+2, argv+1, sizeof(char*)*argc);
 
   /* Run the JIT. */
-  execvp(Interp, Args);
+#ifndef _WIN32
+  execvp(Interp, (char **)Args); /* POSIX execvp takes a char *const[]. */
+#else
+  execvp(Interp, Args); /* windows execvp takes a const char *const *. */
+#endif
   /* if _execv returns, the JIT could not be started. */
   fprintf(stderr, "Could not execute the LLVM JIT.  Either add 'lli' to your"
           " path, or set the\ninterpreter you want to use in the LLVMINTERP "