about summary refs log tree commit diff homepage
path: root/lib/Module
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2018-09-02 13:23:19 +0200
committerMartinNowack <martin.nowack@gmail.com>2018-10-26 22:41:04 +0100
commit3e5e8f7d2c8004b4c452f3b74c9ba4dea78d9d80 (patch)
tree780d7ecf73ac3125896ede72f89bbd0ed85fce82 /lib/Module
parentbe340780e6261416320dd099753e17080de69534 (diff)
downloadklee-3e5e8f7d2c8004b4c452f3b74c9ba4dea78d9d80.tar.gz
llvm7: WriteBitcodeToFile takes Module &
Since llvm commit 06d6207c1c63, WriteBitcodeToFile accepts Module &, not
Module *.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Diffstat (limited to 'lib/Module')
-rw-r--r--lib/Module/KModule.cpp4
1 files changed, 4 insertions, 0 deletions
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<llvm::raw_fd_ostream> 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 */