diff options
Diffstat (limited to 'compilerplugins/clang/plugin.cxx')
-rw-r--r-- | compilerplugins/clang/plugin.cxx | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/compilerplugins/clang/plugin.cxx b/compilerplugins/clang/plugin.cxx index 07f1edecf4c7..56d40e337bf9 100644 --- a/compilerplugins/clang/plugin.cxx +++ b/compilerplugins/clang/plugin.cxx @@ -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 |