diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp index e8837924b4d7..148238f0069b 100644 --- a/lld/COFF/Driver.cpp +++ b/lld/COFF/Driver.cpp @@ -57,7 +57,7 @@ Configuration *Config; LinkerDriver *Driver; bool link(ArrayRef Args, bool CanExitEarly, raw_ostream &Diag) { - errorHandler().LogName = args::FilenameWithoutExe(Args[0]); + errorHandler().LogName = args::getFilenameWithoutExe(Args[0]); errorHandler().ErrorOS = &Diag; errorHandler().ColorDiagnostics = Diag.has_colors(); errorHandler().ErrorLimitExceededMsg = diff --git a/lld/Common/Args.cpp b/lld/Common/Args.cpp index 4f46ba625c38..854b50a17834 100644 --- a/lld/Common/Args.cpp +++ b/lld/Common/Args.cpp @@ -66,7 +66,7 @@ std::vector lld::args::getLines(MemoryBufferRef MB) { return Ret; } -StringRef lld::args::FilenameWithoutExe(StringRef Path) { +StringRef lld::args::getFilenameWithoutExe(StringRef Path) { if (Path.endswith_lower(".exe")) return sys::path::stem(Path); return sys::path::filename(Path); diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index 6aaf8d777c13..5b05b2181822 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -74,7 +74,7 @@ static void setConfigs(opt::InputArgList &Args); bool elf::link(ArrayRef Args, bool CanExitEarly, raw_ostream &Error) { - errorHandler().LogName = args::FilenameWithoutExe(Args[0]); + errorHandler().LogName = args::getFilenameWithoutExe(Args[0]); errorHandler().ErrorLimitExceededMsg = "too many errors emitted, stopping now (use " "-error-limit=0 to see all errors)"; diff --git a/lld/include/lld/Common/Args.h b/lld/include/lld/Common/Args.h index 75ad2e0cd96e..769d4840cf06 100644 --- a/lld/include/lld/Common/Args.h +++ b/lld/include/lld/Common/Args.h @@ -30,7 +30,7 @@ uint64_t getZOptionValue(llvm::opt::InputArgList &Args, int Id, StringRef Key, std::vector getLines(MemoryBufferRef MB); -StringRef FilenameWithoutExe(StringRef Path); +StringRef getFilenameWithoutExe(StringRef Path); } // namespace args } // namespace lld diff --git a/lld/lib/Driver/DarwinLdDriver.cpp b/lld/lib/Driver/DarwinLdDriver.cpp index ef4946701240..289b3007b265 100644 --- a/lld/lib/Driver/DarwinLdDriver.cpp +++ b/lld/lib/Driver/DarwinLdDriver.cpp @@ -1143,7 +1143,7 @@ static void createFiles(MachOLinkingContext &ctx, bool Implicit) { /// This is where the link is actually performed. bool link(llvm::ArrayRef args, bool CanExitEarly, raw_ostream &Error) { - errorHandler().LogName = args::FilenameWithoutExe(args[0]); + errorHandler().LogName = args::getFilenameWithoutExe(args[0]); errorHandler().ErrorLimitExceededMsg = "too many errors emitted, stopping now (use " "'-error-limit 0' to see all errors)"; diff --git a/lld/wasm/Driver.cpp b/lld/wasm/Driver.cpp index b443ee04e233..cf6184036ece 100644 --- a/lld/wasm/Driver.cpp +++ b/lld/wasm/Driver.cpp @@ -78,7 +78,7 @@ private: bool lld::wasm::link(ArrayRef Args, bool CanExitEarly, raw_ostream &Error) { - errorHandler().LogName = args::FilenameWithoutExe(Args[0]); + errorHandler().LogName = args::getFilenameWithoutExe(Args[0]); errorHandler().ErrorOS = &Error; errorHandler().ColorDiagnostics = Error.has_colors(); errorHandler().ErrorLimitExceededMsg =