diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-03-23 10:49:57 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-03-23 13:02:23 +0100 |
commit | 119d8137695e38c16e9fad9f3ce8a774f58e4b9a (patch) | |
tree | 9003666348a5cbd45b7ac1ee57a3471192175e57 /compilerplugins/clang/pluginhandler.cxx | |
parent | aea9d9b054a59ccb53b7160daba808de9db7d814 (diff) |
Revert "Allow compiler plugins for online"
This reverts commit b39e627be45f847554f11fdac040b6f4da4054ba. The assumed (see
comment at <https://gerrit.libreoffice.org/#/c/46769/4/compilerplugins/clang/
plugin.cxx@633>) performance bottleneck of isSamePathname -> getAbsolutePath
does show up in Flamegraph inspections of LO builds. But changing (non-member
function) isSamePathname to only call getAbsolutePath if (PluginHandlder member
function) isLOOLMode is true would need some code reorg, and Online development
doesn't seem to make too much actual use of the plugin, so conclusion on IRC was
to revert.
Change-Id: I0f04fdcc87087dac516630ed5e48361f5ea332ca
Reviewed-on: https://gerrit.libreoffice.org/51774
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/pluginhandler.cxx')
-rw-r--r-- | compilerplugins/clang/pluginhandler.cxx | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/compilerplugins/clang/pluginhandler.cxx b/compilerplugins/clang/pluginhandler.cxx index 959941fb72a9..3f169972f6a2 100644 --- a/compilerplugins/clang/pluginhandler.cxx +++ b/compilerplugins/clang/pluginhandler.cxx @@ -18,7 +18,6 @@ #include <clang/Frontend/CompilerInstance.h> #include <clang/Frontend/FrontendPluginRegistry.h> #include <clang/Lex/PPCallbacks.h> - #include <stdio.h> #if defined _WIN32 @@ -117,8 +116,6 @@ void PluginHandler::handleOption( const std::string& option ) unitTestMode = true; else if (option == "debug") debugMode = true; - else if ( option.substr(0, 15) == "lool-base-path=" ) - loolBasePath = option.substr(15); else report( DiagnosticsEngine::Fatal, "unknown option %0" ) << option; } @@ -196,7 +193,7 @@ bool PluginHandler::checkIgnoreLocation(SourceLocation loc) if( compiler.getSourceManager().isInSystemHeader( expansionLoc )) return true; const char* bufferName = compiler.getSourceManager().getPresumedLoc( expansionLoc ).getFilename(); - if (bufferName == nullptr + if (bufferName == NULL || hasPathnamePrefix(bufferName, SRCDIR "/external/") || isSamePathname(bufferName, SRCDIR "/sdext/source/pdfimport/wrapper/keyword_list") ) // workdir/CustomTarget/sdext/pdfimport/hash.cxx is generated from @@ -225,11 +222,6 @@ bool PluginHandler::checkIgnoreLocation(SourceLocation loc) if (hasPathnamePrefix(s, WORKDIR)) return true; } - if ( isLOOLMode() ) { - std::string absPath = getAbsolutePath(bufferName); - if ( StringRef(absPath).startswith(loolBasePath) ) - return false; - } if( hasPathnamePrefix(bufferName, BUILDDIR) || hasPathnamePrefix(bufferName, SRCDIR) ) return false; // ok @@ -305,12 +297,6 @@ void PluginHandler::HandleTranslationUnit( ASTContext& context ) pathWarning = "modified source in build dir : %0"; else if( name.startswith(SRCDIR "/") ) ; // ok - else if ( isLOOLMode() ) - { - std::string absPath = getAbsolutePath(name); - if ( !StringRef(absPath).startswith(loolBasePath) ) - bSkip = true; - } else { pathWarning = "modified source in unknown location, not modifying : %0"; |