--- OpenShadingLanguage-Release-1.8.15/src/liboslexec/llvm_util.cpp.orig 2018-12-06 11:58:57.216034300 +0300 +++ OpenShadingLanguage-Release-1.8.15/src/liboslexec/llvm_util.cpp 2018-12-06 11:59:00.476038800 +0300 @@ -99,6 +99,11 @@ # include #endif +#if OSL_LLVM_VERSION >= 70 +#include +#include +#endif + OSL_NAMESPACE_ENTER namespace pvt { @@ -1720,7 +1725,11 @@ std::string local_error; llvm::raw_fd_ostream out (filename, err ? *err : local_error); #endif +#if OSL_LLVM_VERSION >= 70 + llvm::WriteBitcodeToFile (*module(), out); +#else llvm::WriteBitcodeToFile (module(), out); +#endif #if OSL_LLVM_VERSION >= 36 if (err && local_error)