diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-08-21 09:01:12 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-08-21 12:37:36 +0200 |
commit | 8b30e6f03407df94e0adb46c6f3fb492a2419114 (patch) | |
tree | e09a1c3626031c81840f230dd1517c52ab90d80e /compilerplugins | |
parent | d053d573d8bb70ba02ed60eecc590485e2e19497 (diff) |
llvm::make_unique is gone from LLVM trunk
(but when targeting older versions of LLVM/Clang, COMPILER_PLUGINS_CXX can still
specify -std=c++11)
Change-Id: I1b91f2817516d015bc12b6a3faf1874ab938a3ae
Reviewed-on: https://gerrit.libreoffice.org/77866
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/pluginhandler.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compilerplugins/clang/pluginhandler.cxx b/compilerplugins/clang/pluginhandler.cxx index 4296b981f767..43c9fb33c1c6 100644 --- a/compilerplugins/clang/pluginhandler.cxx +++ b/compilerplugins/clang/pluginhandler.cxx @@ -11,6 +11,7 @@ #include <memory> #include <system_error> +#include <utility> #include "plugin.hxx" #include "pluginhandler.hxx" @@ -385,7 +386,11 @@ void PluginHandler::HandleTranslationUnit( ASTContext& context ) std::unique_ptr<ASTConsumer> LibreOfficeAction::CreateASTConsumer( CompilerInstance& Compiler, StringRef ) { +#if __cplusplus >= 201402L + return std::make_unique<PluginHandler>( Compiler, _args ); +#else return llvm::make_unique<PluginHandler>( Compiler, _args ); +#endif } bool LibreOfficeAction::ParseArgs( const CompilerInstance&, const std::vector< std::string >& args ) |