about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2018-09-02 13:25:06 +0200
committerMartinNowack <martin.nowack@gmail.com>2018-10-26 22:41:04 +0100
commitf326c6aab9ac1b38016076a1d0ff5b55e0813b87 (patch)
tree36958c61166098ff7053e619ea06c8d044d52e12
parent3e5e8f7d2c8004b4c452f3b74c9ba4dea78d9d80 (diff)
downloadklee-f326c6aab9ac1b38016076a1d0ff5b55e0813b87.tar.gz
llvm7: adapt to new openFileForWrite
In llvm commit 03bcb2143b5c, OpenFlags were split and openFileForWrite
accepts one more parameter. Fortunately, openFileForWrite now defaults
to F_None, so we remove the parameter completely from llvm 3.7 and
later.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
-rw-r--r--lib/Support/CompressionStream.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Support/CompressionStream.cpp b/lib/Support/CompressionStream.cpp
index d17e1df1..ff2d290f 100644
--- a/lib/Support/CompressionStream.cpp
+++ b/lib/Support/CompressionStream.cpp
@@ -28,7 +28,10 @@ compressed_fd_ostream::compressed_fd_ostream(const std::string &Filename,
     : llvm::raw_ostream(), pos(0) {
   ErrorInfo = "";
   // Open file in binary mode
-#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
+#if LLVM_VERSION_CODE >= LLVM_VERSION(7, 0)
+  std::error_code EC =
+      llvm::sys::fs::openFileForWrite(Filename, FD);
+#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
   std::error_code EC =
       llvm::sys::fs::openFileForWrite(Filename, FD, llvm::sys::fs::F_None);
 #else