diff options
-rw-r--r-- | lld/ELF/DriverUtils.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/DriverUtils.cpp b/lld/ELF/DriverUtils.cpp index 57dfea357a3..918c29fd143 100644 --- a/lld/ELF/DriverUtils.cpp +++ b/lld/ELF/DriverUtils.cpp @@ -101,9 +101,9 @@ static std::string relative_to_root(StringRef Path) { // of the result. SmallString<128> Res; StringRef Root = path::root_name(Path); - if (Path.endswith(":")) + if (Root.endswith(":")) Res = Root.drop_back(); - else if (Path.startswith("//")) + else if (Root.startswith("//")) Res = Root.substr(2); path::append(Res, path::relative_path(Abs)); |