compilerplugins/clang/pluginhandler.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+)
New commits: commit 67ae9380b7adb67590192d6122b713839eaf4665 Author: Luboš Luňák <[email protected]> AuthorDate: Tue Jan 28 22:10:10 2020 +0100 Commit: Luboš Luňák <[email protected]> CommitDate: Wed Jan 29 21:59:09 2020 +0100 make our clang plugin visible in -ftime-trace output Change-Id: Id9363d8db729883d0f72eb9fcbf6d8bf5b396414 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87662 Tested-by: Jenkins Reviewed-by: Luboš Luňák <[email protected]> diff --git a/compilerplugins/clang/pluginhandler.cxx b/compilerplugins/clang/pluginhandler.cxx index 02150c2b10c5..492561fb3a3e 100644 --- a/compilerplugins/clang/pluginhandler.cxx +++ b/compilerplugins/clang/pluginhandler.cxx @@ -21,6 +21,10 @@ #include <clang/Lex/PPCallbacks.h> #include <stdio.h> +#if CLANG_VERSION >= 90000 +#include <llvm/Support/TimeProfiler.h> +#endif + #if defined _WIN32 #include <process.h> #else @@ -292,6 +296,9 @@ void PluginHandler::addSourceModification(SourceRange range) void PluginHandler::HandleTranslationUnit( ASTContext& context ) { +#if CLANG_VERSION >= 90000 + llvm::TimeTraceScope mainTimeScope("LOPluginMain", StringRef("")); +#endif if( context.getDiagnostics().hasErrorOccurred()) return; if (mainFileName.endswith(".ii")) @@ -305,6 +312,9 @@ void PluginHandler::HandleTranslationUnit( ASTContext& context ) { if( plugins[ i ].object != NULL && !plugins[ i ].disabledRun ) { +#if CLANG_VERSION >= 90000 + llvm::TimeTraceScope timeScope("LOPlugin", [&]() { return plugins[i].optionName; }); +#endif plugins[ i ].object->run(); } } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
