Skip to content

Commit 02b5851

Browse files
committed
Polyfill LLVMBuildExactUDiv
It was added 32 days after LLVM 3.9 shipped.
1 parent d6926ca commit 02b5851

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/rustllvm/RustWrapper.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -1492,3 +1492,11 @@ LLVMRustBuildVectorReduceFMax(LLVMBuilderRef, LLVMValueRef, bool) {
14921492
return nullptr;
14931493
}
14941494
#endif
1495+
1496+
#if LLVM_VERSION_LT(4, 0)
1497+
extern "C" LLVMValueRef
1498+
LLVMBuildExactUDiv(LLVMBuilderRef B, LLVMValueRef LHS,
1499+
LLVMValueRef RHS, const char *Name) {
1500+
return wrap(unwrap(B)->CreateExactUDiv(unwrap(LHS), unwrap(RHS), Name));
1501+
}
1502+
#endif

0 commit comments

Comments
 (0)