Hack around incompatible pointer warnings.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 16 Oct 2010 15:43:02 +0000 (15:43 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 16 Oct 2010 15:43:02 +0000 (15:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116671 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-stub/llvm-stub.c

index f1f12d0ff676e37923439c6047e57c42f4b82cc9..31c2d09c6b7eb8f20b08d40ef7b6a3ff5094d37e 100644 (file)
@@ -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 "