diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2018-03-24 19:15:12 -0700 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2018-03-24 19:15:12 -0700 |
| commit | 02b5851258c5a0db32d1c735d1c29e5e56f45ed1 (patch) | |
| tree | cee07c62e88ed16fcd4f00fe0e958eff8df27de3 /src/rustllvm/RustWrapper.cpp | |
| parent | d6926ca12daa51fd786f233019ac539d1a732493 (diff) | |
| download | rust-02b5851258c5a0db32d1c735d1c29e5e56f45ed1.tar.gz rust-02b5851258c5a0db32d1c735d1c29e5e56f45ed1.zip | |
Polyfill LLVMBuildExactUDiv
It was added 32 days after LLVM 3.9 shipped.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
| -rw-r--r-- | src/rustllvm/RustWrapper.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index a5644d6f9e2..e815d151aeb 100644 --- a/src/rustllvm/RustWrapper.cpp +++ b/src/rustllvm/RustWrapper.cpp @@ -1492,3 +1492,11 @@ LLVMRustBuildVectorReduceFMax(LLVMBuilderRef, LLVMValueRef, bool) { return nullptr; } #endif + +#if LLVM_VERSION_LT(4, 0) +extern "C" LLVMValueRef +LLVMBuildExactUDiv(LLVMBuilderRef B, LLVMValueRef LHS, + LLVMValueRef RHS, const char *Name) { + return wrap(unwrap(B)->CreateExactUDiv(unwrap(LHS), unwrap(RHS), Name)); +} +#endif |
