CloneModule interface changed in LLVM 7.0
This is an effect of this LLVM commit:
commit
Author: Rafael Espindola
Date:   Wed Feb 14 19:50:40 2018 +0000
Pass a module reference to CloneModule.
It can never be null and most callers were already using references or
std::unique_ptr.
@@ -654,8 +654,10 @@ int pocl_llvm_link_program(cl_program program, unsigned device_i,
#ifdef LLVM_OLDER_THAN_3_8
if (Linker::LinkModules(mod, llvm::CloneModule(p))) {
delete mod;
-#else
+#elif LLVM_OLDER_THAN_7_0
if (Linker::linkModules(*mod, llvm::CloneModule(p))) {
+#else
+ if (Linker::linkModules(*mod, llvm::CloneModule(*p))) {
#endif
std::string msg = getDiagString();
appendToProgramBuildLog(program, device_i, msg);
