From fb5a305b2de91bda26da10ee3770f10913bfd84e Mon Sep 17 00:00:00 2001 From: Akshay Krishnan R Date: Sun, 30 Jun 2019 14:39:55 +0530 Subject: [PATCH] Fix the arguments to WriteBitcodeToFile function WriteBitcodeToFile expectes reference to the Module object: https://llvm.org/doxygen/BitcodeWriter_8cpp_source.html#l04360 Error details: razzer/tools/SVF/lib/Util/SVFModule.cpp:371:36: error: cannot convert 'llvm::Module' to 'const llvm::Module*' for argument '1' to 'void llvm::WriteBitcodeToFile(const llvm::Module*, llvm::raw_ostream&, bool, const llvm::ModuleSummaryIndex*, bool, llvm::ModuleHash*)' WriteBitcodeToFile(*mod, OS); --- lib/Util/SVFModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Util/SVFModule.cpp b/lib/Util/SVFModule.cpp index a653e8311..da1381ff2 100644 --- a/lib/Util/SVFModule.cpp +++ b/lib/Util/SVFModule.cpp @@ -368,7 +368,7 @@ void LLVMModuleSet::dumpModulesToFile(const std::string suffix) { std::error_code EC; llvm::raw_fd_ostream OS(OutputFilename.c_str(), EC, llvm::sys::fs::F_None); - WriteBitcodeToFile(*mod, OS); + WriteBitcodeToFile(mod, OS); OS.flush(); } }