diff options
author | Duncan Sands <baldrick@free.fr> | 2009-11-23 10:49:03 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2009-11-23 10:49:03 +0000 |
commit | 9d786d701d91cc149c54016d1881bd0f990235f6 (patch) | |
tree | 6755bab67b0963cd0e4035b26c47778bde64d027 | |
parent | 890a1d120f3017927bd6b3120803d896f48f25b9 (diff) | |
download | bcm5719-llvm-9d786d701d91cc149c54016d1881bd0f990235f6.tar.gz bcm5719-llvm-9d786d701d91cc149c54016d1881bd0f990235f6.zip |
I forgot to update the prototype for LLVMBuildIntCast when correcting
the body to not pass the name for the isSigned parameter. However it
seems that changing prototypes is a big-no-no, so here I revert the
previous change and pass "true" for isSigned, meaning this always does
a signed cast, which was the previous behaviour assuming the name was
not NULL! Some other C function needs to be introduced for the general
case of signed or unsigned casts. This hopefully unbreaks the ocaml
binding.
llvm-svn: 89648
-rw-r--r-- | llvm/include/llvm-c/Core.h | 2 | ||||
-rw-r--r-- | llvm/lib/VMCore/Core.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h index 7cb5bc371b7..c741d1c19a3 100644 --- a/llvm/include/llvm-c/Core.h +++ b/llvm/include/llvm-c/Core.h @@ -870,7 +870,7 @@ LLVMValueRef LLVMBuildTruncOrBitCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name); LLVMValueRef LLVMBuildPointerCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildIntCast(LLVMBuilderRef, LLVMValueRef Val, +LLVMValueRef LLVMBuildIntCast(LLVMBuilderRef, LLVMValueRef Val, /*Signed cast!*/ LLVMTypeRef DestTy, const char *Name); LLVMValueRef LLVMBuildFPCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name); diff --git a/llvm/lib/VMCore/Core.cpp b/llvm/lib/VMCore/Core.cpp index 78cd4dcafc6..449e9671ab7 100644 --- a/llvm/lib/VMCore/Core.cpp +++ b/llvm/lib/VMCore/Core.cpp @@ -1860,9 +1860,9 @@ LLVMValueRef LLVMBuildPointerCast(LLVMBuilderRef B, LLVMValueRef Val, } LLVMValueRef LLVMBuildIntCast(LLVMBuilderRef B, LLVMValueRef Val, - LLVMTypeRef DestTy, int isSigned, - const char *Name) { - return wrap(unwrap(B)->CreateIntCast(unwrap(Val), unwrap(DestTy), isSigned, Name)); + LLVMTypeRef DestTy, const char *Name) { + return wrap(unwrap(B)->CreateIntCast(unwrap(Val), unwrap(DestTy), + /*isSigned*/true, Name)); } LLVMValueRef LLVMBuildFPCast(LLVMBuilderRef B, LLVMValueRef Val, |