1
Fork 0

Fix intcast, use it where appropriate

This commit is contained in:
Simonas Kazlauskas 2017-02-10 19:29:39 +02:00
parent 7d1f36a482
commit f3bd723101
7 changed files with 34 additions and 22 deletions

View file

@ -1308,6 +1308,12 @@ extern "C" LLVMRustVisibility LLVMRustGetVisibility(LLVMValueRef V) {
return toRust(LLVMGetVisibility(V));
}
// Oh hey, a binding that makes sense for once? (because LLVMs own do not)
extern "C" LLVMValueRef LLVMRustBuildIntCast(LLVMBuilderRef B, LLVMValueRef Val,
LLVMTypeRef DestTy, bool isSigned) {
return wrap(unwrap(B)->CreateIntCast(unwrap(Val), unwrap(DestTy), isSigned, ""));
}
extern "C" void LLVMRustSetVisibility(LLVMValueRef V,
LLVMRustVisibility RustVisibility) {
LLVMSetVisibility(V, fromRust(RustVisibility));