diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2018-01-25 12:49:01 -0600 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2018-01-25 13:49:54 -0800 |
| commit | 8a9381db01c71851654e445e7f2d81786fc80ecd (patch) | |
| tree | 133465413a64b18bbe2bf90eb71bf25220dfab6d /src/rustllvm/RustWrapper.cpp | |
| parent | f7706d5816b48a9dcc31b06472ecb630eab2ea44 (diff) | |
| parent | e9a64996bedbc224d1edb401162d2c3cc15eb7c1 (diff) | |
| download | rust-8a9381db01c71851654e445e7f2d81786fc80ecd.tar.gz rust-8a9381db01c71851654e445e7f2d81786fc80ecd.zip | |
Rollup merge of #47710 - alexcrichton:llvm-6-compat, r=nikomatsakis
First round of LLVM 6.0.0 compatibility This includes a number of commits for the first round of upgrading to LLVM 6. There are still [lingering bugs](https://github.com/rust-lang/rust/issues/47683) but I believe all of this will nonetheless be necessary!
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
| -rw-r--r-- | src/rustllvm/RustWrapper.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index 82aafb7c355..611d63f6a4d 100644 --- a/src/rustllvm/RustWrapper.cpp +++ b/src/rustllvm/RustWrapper.cpp @@ -315,7 +315,11 @@ extern "C" void LLVMRustRemoveFunctionAttributes(LLVMValueRef Fn, // 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 } } |
