diff options
-rw-r--r-- | lib/Support/FileHandling.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Support/FileHandling.cpp b/lib/Support/FileHandling.cpp index 9809b87d..46205521 100644 --- a/lib/Support/FileHandling.cpp +++ b/lib/Support/FileHandling.cpp @@ -24,8 +24,15 @@ std::unique_ptr<llvm::raw_fd_ostream> klee_open_output_file(const std::string &path, std::string &error) { error.clear(); std::error_code ec; + +#if LLVM_VERSION_CODE >= LLVM_VERSION(7, 0) + auto f = std::make_unique<llvm::raw_fd_ostream>(path.c_str(), ec, + llvm::sys::fs::OF_None); +#else auto f = std::make_unique<llvm::raw_fd_ostream>(path.c_str(), ec, llvm::sys::fs::F_None); +#endif + if (ec) error = ec.message(); if (!error.empty()) { |