summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-stub/llvm-stub.c
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-10-16 15:43:02 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-10-16 15:43:02 +0000
commit2fcb554f5b44804ca2bc37c8918c75b1582e0549 (patch)
tree385b89ed861f8b22daf00225ba97bfc1f85c91a9 /llvm/tools/llvm-stub/llvm-stub.c
parent1dc34b48dd20759ed6d73f8981d3e03ea988f59b (diff)
downloadbcm5719-llvm-2fcb554f5b44804ca2bc37c8918c75b1582e0549.tar.gz
bcm5719-llvm-2fcb554f5b44804ca2bc37c8918c75b1582e0549.zip
Hack around incompatible pointer warnings.
llvm-svn: 116671
Diffstat (limited to 'llvm/tools/llvm-stub/llvm-stub.c')
-rw-r--r--llvm/tools/llvm-stub/llvm-stub.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/tools/llvm-stub/llvm-stub.c b/llvm/tools/llvm-stub/llvm-stub.c
index f1f12d0ff67..31c2d09c6b7 100644
--- a/llvm/tools/llvm-stub/llvm-stub.c
+++ b/llvm/tools/llvm-stub/llvm-stub.c
@@ -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 "
OpenPOWER on IntegriCloud