Adapt compilerplugins to llvm::sys::fs::OF_None rename

...from F_None, which happened with
<1f67a3cba9>
"[FileSystem] Split up the OpenFlags enumeration" towards LLVM 7, originally
leaving the alternative F_None spelling in for compatibility, but which was
finally removed now with
<3302af9d4c>
"Support: Remove F_{None,Text,Append} compatibility synonyms, NFC".

Change-Id: Iea1192b5ee351c13ea5d6701887f3aba62133c20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117609
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann 2021-06-22 08:10:58 +02:00
parent 990b2cb056
commit 6b975a48e8
2 changed files with 8 additions and 1 deletions

View File

@ -346,6 +346,12 @@ inline bool isPtrMemOp(clang::BinaryOperatorKind op) {
#endif #endif
} }
#if CLANG_VERSION >= 70000
constexpr llvm::sys::fs::OpenFlags OF_None = llvm::sys::fs::OF_None;
#else
constexpr llvm::sys::fs::OpenFlags OF_None = llvm::sys::fs::F_None;
#endif
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -13,6 +13,7 @@
#include <system_error> #include <system_error>
#include <utility> #include <utility>
#include "compat.hxx"
#include "plugin.hxx" #include "plugin.hxx"
#include "pluginhandler.hxx" #include "pluginhandler.hxx"
@ -392,7 +393,7 @@ void PluginHandler::HandleTranslationUnit( ASTContext& context )
bool bOk = false; bool bOk = false;
std::error_code ec; std::error_code ec;
std::unique_ptr<raw_fd_ostream> ostream( std::unique_ptr<raw_fd_ostream> ostream(
new raw_fd_ostream(filename, ec, sys::fs::F_None)); new raw_fd_ostream(filename, ec, compat::OF_None));
if( !ec) if( !ec)
{ {
it->second.write( *ostream ); it->second.write( *ostream );