diff options
author | Fangrui Song <i@maskray.me> | 2023-04-26 20:43:11 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2023-04-26 20:43:11 -0700 |
commit | 71cb689661ab107986a3773571ab9985d6c47114 (patch) | |
tree | 6bfc45c77f2a22d6fd2a2bdd83c66571c14be5a9 /lld | |
parent | 1855c0a82a2798276cafe765d825ac7875f5bf1d (diff) | |
download | llvm-71cb689661ab107986a3773571ab9985d6c47114.tar.gz |
[LTO] Change getThinLTOOutputFile to take StringRef
Diffstat (limited to 'lld')
-rw-r--r-- | lld/COFF/LTO.cpp | 5 | ||||
-rw-r--r-- | lld/ELF/LTO.cpp | 5 | ||||
-rw-r--r-- | lld/MachO/LTO.cpp | 5 |
3 files changed, 6 insertions, 9 deletions
diff --git a/lld/COFF/LTO.cpp b/lld/COFF/LTO.cpp index fb3ba2c6e9d7..cca14be0fc2b 100644 --- a/lld/COFF/LTO.cpp +++ b/lld/COFF/LTO.cpp @@ -55,9 +55,8 @@ static std::unique_ptr<raw_fd_ostream> openFile(StringRef file) { } std::string BitcodeCompiler::getThinLTOOutputFile(StringRef path) { - return lto::getThinLTOOutputFile( - std::string(path), std::string(ctx.config.thinLTOPrefixReplaceOld), - std::string(ctx.config.thinLTOPrefixReplaceNew)); + return lto::getThinLTOOutputFile(path, ctx.config.thinLTOPrefixReplaceOld, + ctx.config.thinLTOPrefixReplaceNew); } lto::Config BitcodeCompiler::createConfig() { diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp index 8b5c23ee6a47..f16abc188b76 100644 --- a/lld/ELF/LTO.cpp +++ b/lld/ELF/LTO.cpp @@ -67,9 +67,8 @@ static std::unique_ptr<raw_fd_ostream> openLTOOutputFile(StringRef file) { } static std::string getThinLTOOutputFile(StringRef modulePath) { - return lto::getThinLTOOutputFile( - std::string(modulePath), std::string(config->thinLTOPrefixReplaceOld), - std::string(config->thinLTOPrefixReplaceNew)); + return lto::getThinLTOOutputFile(modulePath, config->thinLTOPrefixReplaceOld, + config->thinLTOPrefixReplaceNew); } static lto::Config createConfig() { diff --git a/lld/MachO/LTO.cpp b/lld/MachO/LTO.cpp index 481ac9444ef0..a2d3934c5bce 100644 --- a/lld/MachO/LTO.cpp +++ b/lld/MachO/LTO.cpp @@ -46,9 +46,8 @@ static std::unique_ptr<raw_fd_ostream> openFile(StringRef file) { } static std::string getThinLTOOutputFile(StringRef modulePath) { - return lto::getThinLTOOutputFile( - std::string(modulePath), std::string(config->thinLTOPrefixReplaceOld), - std::string(config->thinLTOPrefixReplaceNew)); + return lto::getThinLTOOutputFile(modulePath, config->thinLTOPrefixReplaceOld, + config->thinLTOPrefixReplaceNew); } static lto::Config createConfig() { |