diff options
| author | Simonas Kazlauskas <git@kazlauskas.me> | 2017-02-10 19:29:39 +0200 |
|---|---|---|
| committer | Simonas Kazlauskas <git@kazlauskas.me> | 2017-02-10 19:47:09 +0200 |
| commit | f3bd7231015706bee72846a758e1234febaaa60a (patch) | |
| tree | 9a3072e5e71a3f79a1f2fe0a986e446387626e15 /src/rustllvm/RustWrapper.cpp | |
| parent | 7d1f36a482fed39ea5989bf971464622b8cba89e (diff) | |
| download | rust-f3bd7231015706bee72846a758e1234febaaa60a.tar.gz rust-f3bd7231015706bee72846a758e1234febaaa60a.zip | |
Fix intcast, use it where appropriate
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
| -rw-r--r-- | src/rustllvm/RustWrapper.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index 27233a8b075..c15a0c3d25a 100644 --- a/src/rustllvm/RustWrapper.cpp +++ b/src/rustllvm/RustWrapper.cpp @@ -1308,6 +1308,12 @@ extern "C" LLVMRustVisibility LLVMRustGetVisibility(LLVMValueRef V) { return toRust(LLVMGetVisibility(V)); } +// Oh hey, a binding that makes sense for once? (because LLVM’s 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)); |
