Polyfill LLVMBuildExactUDiv

It was added 32 days after LLVM 3.9 shipped.
This commit is contained in:
Scott McMurray 2018-03-24 19:15:12 -07:00
parent d6926ca12d
commit 02b5851258
1 changed files with 8 additions and 0 deletions

View File

@ -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