$OpenBSD: patch-src_rustllvm_RustWrapper_cpp,v 1.1 2018/02/23 16:38:16 landry Exp $
Backport patches for LLVM 6 compatibility:
 9eeecd2adad8c5c94348dbd1c61709fa49f65ff8
Index: src/rustllvm/RustWrapper.cpp
--- src/rustllvm/RustWrapper.cpp.orig
+++ src/rustllvm/RustWrapper.cpp
@@ -315,7 +315,11 @@ extern "C" void LLVMRustRemoveFunctionAttributes(LLVMV
 // enable fpmath flag UnsafeAlgebra
 extern "C" void LLVMRustSetHasUnsafeAlgebra(LLVMValueRef V) {
   if (auto I = dyn_cast<Instruction>(unwrap<Value>(V))) {
+#if LLVM_VERSION_GE(6, 0)
+    I->setFast(true);
+#else
     I->setHasUnsafeAlgebra(true);
+#endif
   }
 }
 
