Description: LLVM 3.8 compatibility These fixes come straight from upstream's git. Origin: Upstream, https://github.com/JuliaLang/julia/commit/b67609b988febe062e6709d8972c4f869c82cfc0 Origin: Upstream, https://github.com/JuliaLang/julia/commit/3f6abadc9d12bb9d59ec775db4277b3841395d0b Origin: Upstream, https://github.com/JuliaLang/julia/commit/caf3c74426696d43101d9607b1a2cd3a5e05bc0f Author: Graham Inggs Last-Update: 2016-02-03 --- a/src/cgutils.cpp +++ b/src/cgutils.cpp @@ -219,7 +219,11 @@ } } +#ifdef LLVM38 + virtual Value *materializeDeclFor(Value *V) +#else virtual Value *materializeValueFor (Value *V) +#endif { Function *F = dyn_cast(V); if (F) { @@ -492,7 +496,11 @@ // now copy the module, since PM.run may modify it ValueToValueMapTy VMap; +#ifdef LLVM38 + Module *clone = CloneModule(shadow_module, VMap).release(); +#else Module *clone = CloneModule(shadow_module, VMap); +#endif #ifdef LLVM37 // Reset the target triple to make sure it matches the new target machine clone->setTargetTriple(TM->getTargetTriple().str()); --- a/src/intrinsics.cpp +++ b/src/intrinsics.cpp @@ -780,12 +780,20 @@ jl_options.fast_math == JL_OPTIONS_FAST_MATH_ON)) { FastMathFlags fmf; fmf.setUnsafeAlgebra(); +#ifdef LLVM38 + builder.setFastMathFlags(fmf); +#else builder.SetFastMathFlags(fmf); +#endif } } IRBuilder<>& operator()() const { return builder; } ~math_builder() { +#ifdef LLVM38 + builder.setFastMathFlags(old_fmf); +#else builder.SetFastMathFlags(old_fmf); +#endif } };