|
9 | 9 | // except according to those terms.
|
10 | 10 |
|
11 | 11 | use core::hashmap::HashMap;
|
12 |
| -use core::libc::c_uint; |
| 12 | +use core::libc::{c_uint, c_ushort}; |
13 | 13 |
|
14 | 14 | pub type Opcode = u32;
|
15 | 15 | pub type Bool = c_uint;
|
@@ -221,7 +221,7 @@ pub mod llvm {
|
221 | 221 | use super::{SectionIteratorRef, TargetDataRef, TypeKind, TypeRef, UseRef};
|
222 | 222 | use super::{ValueRef};
|
223 | 223 |
|
224 |
| - use core::libc::{c_char, c_int, c_longlong, c_uint, c_ulonglong}; |
| 224 | + use core::libc::{c_char, c_int, c_longlong, c_ushort, c_uint, c_ulonglong}; |
225 | 225 |
|
226 | 226 | #[link_args = "-Lrustllvm -lrustllvm"]
|
227 | 227 | #[link_name = "rustllvm"]
|
@@ -452,9 +452,9 @@ pub mod llvm {
|
452 | 452 | #[fast_ffi]
|
453 | 453 | pub unsafe fn LLVMConstAllOnes(Ty: TypeRef) -> ValueRef;
|
454 | 454 | #[fast_ffi]
|
455 |
| - pub unsafe fn LLVMConstICmp(Pred: c_uint, V1: ValueRef, V2: ValueRef) -> ValueRef; |
| 455 | + pub unsafe fn LLVMConstICmp(Pred: c_ushort, V1: ValueRef, V2: ValueRef) -> ValueRef; |
456 | 456 | #[fast_ffi]
|
457 |
| - pub unsafe fn LLVMConstFCmp(Pred: c_uint, V1: ValueRef, V2: ValueRef) -> ValueRef; |
| 457 | + pub unsafe fn LLVMConstFCmp(Pred: c_ushort, V1: ValueRef, V2: ValueRef) -> ValueRef; |
458 | 458 | /* only for int/vector */
|
459 | 459 | #[fast_ffi]
|
460 | 460 | pub unsafe fn LLVMGetUndef(Ty: TypeRef) -> ValueRef;
|
@@ -1920,12 +1920,12 @@ pub fn SetLinkage(Global: ValueRef, Link: Linkage) {
|
1920 | 1920 |
|
1921 | 1921 | pub fn ConstICmp(Pred: IntPredicate, V1: ValueRef, V2: ValueRef) -> ValueRef {
|
1922 | 1922 | unsafe {
|
1923 |
| - llvm::LLVMConstICmp(Pred as c_uint, V1, V2) |
| 1923 | + llvm::LLVMConstICmp(Pred as c_ushort, V1, V2) |
1924 | 1924 | }
|
1925 | 1925 | }
|
1926 | 1926 | pub fn ConstFCmp(Pred: RealPredicate, V1: ValueRef, V2: ValueRef) -> ValueRef {
|
1927 | 1927 | unsafe {
|
1928 |
| - llvm::LLVMConstICmp(Pred as c_uint, V1, V2) |
| 1928 | + llvm::LLVMConstFCmp(Pred as c_ushort, V1, V2) |
1929 | 1929 | }
|
1930 | 1930 | }
|
1931 | 1931 | /* Memory-managed object interface to type handles. */
|
|
0 commit comments