Revert "Allow compiler plugins for online"
This reverts commit b39e627be4
. 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>
This commit is contained in:
@@ -18,8 +18,6 @@
|
||||
#include <clang/Basic/FileManager.h>
|
||||
#include <clang/Lex/Lexer.h>
|
||||
|
||||
#include <llvm/Support/Path.h>
|
||||
|
||||
#include "pluginhandler.hxx"
|
||||
|
||||
/*
|
||||
@@ -653,20 +651,10 @@ bool hasPathnamePrefix(StringRef pathname, StringRef prefix)
|
||||
[](StringRef p, StringRef a) { return p.startswith(a); });
|
||||
}
|
||||
|
||||
std::string getAbsolutePath(StringRef path)
|
||||
{
|
||||
llvm::SmallString<1024> absPath(path);
|
||||
llvm::sys::fs::make_absolute(absPath);
|
||||
llvm::sys::path::remove_dots(absPath, true);
|
||||
return absPath.str().str();
|
||||
}
|
||||
|
||||
bool isSamePathname(StringRef pathname, StringRef other)
|
||||
{
|
||||
std::string absPathname = getAbsolutePath(pathname);
|
||||
std::string absOther = getAbsolutePath(other);
|
||||
return checkPathname(
|
||||
absPathname, absOther, [](StringRef p, StringRef a) { return p == a; });
|
||||
pathname, other, [](StringRef p, StringRef a) { return p == a; });
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
Reference in New Issue
Block a user