From 3e5e8f7d2c8004b4c452f3b74c9ba4dea78d9d80 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Sun, 2 Sep 2018 13:23:19 +0200 Subject: llvm7: WriteBitcodeToFile takes Module & Since llvm commit 06d6207c1c63, WriteBitcodeToFile accepts Module &, not Module *. Signed-off-by: Jiri Slaby --- lib/Module/KModule.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/Module/KModule.cpp b/lib/Module/KModule.cpp index b025c888..1fc0cb18 100644 --- a/lib/Module/KModule.cpp +++ b/lib/Module/KModule.cpp @@ -288,7 +288,11 @@ void KModule::manifest(InterpreterHandler *ih, bool forceSourceOutput) { if (OutputModule) { std::unique_ptr f(ih->openOutputFile("final.bc")); +#if LLVM_VERSION_CODE >= LLVM_VERSION(7, 0) + WriteBitcodeToFile(*module, *f); +#else WriteBitcodeToFile(module.get(), *f); +#endif } /* Build shadow structures */ -- cgit 1.4.1