diff options
author | Kazu Hirata <kazu@google.com> | 2024-01-19 22:24:09 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2024-01-19 22:24:09 -0800 |
commit | 10886a8f0a054d8d97708fcfbe03313d81fae35e (patch) | |
tree | 5b58e0d7ddac04839c55ffe1695acd81a7b1d1d4 /clang/lib/Driver/ToolChain.cpp | |
parent | 963d7b4b2a0a80e29d4a862c3629a21de0af975f (diff) | |
download | llvm-10886a8f0a054d8d97708fcfbe03313d81fae35e.zip llvm-10886a8f0a054d8d97708fcfbe03313d81fae35e.tar.gz llvm-10886a8f0a054d8d97708fcfbe03313d81fae35e.tar.bz2 |
[Driver] Use SmallString::operator std::string (NFC)
Diffstat (limited to 'clang/lib/Driver/ToolChain.cpp')
-rw-r--r-- | clang/lib/Driver/ToolChain.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp index 96a5792..3880305 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -606,7 +606,7 @@ std::string ToolChain::getCompilerRTPath() const { } else { llvm::sys::path::append(Path, "lib", getOSLibName()); } - return std::string(Path.str()); + return std::string(Path); } std::string ToolChain::getCompilerRTBasename(const ArgList &Args, @@ -659,7 +659,7 @@ std::string ToolChain::getCompilerRT(const ArgList &Args, StringRef Component, SmallString<128> P(LibPath); llvm::sys::path::append(P, CRTBasename); if (getVFS().exists(P)) - return std::string(P.str()); + return std::string(P); } // Fall back to the old expected compiler-rt name if the new one does not @@ -668,7 +668,7 @@ std::string ToolChain::getCompilerRT(const ArgList &Args, StringRef Component, buildCompilerRTBasename(Args, Component, Type, /*AddArch=*/true); SmallString<128> Path(getCompilerRTPath()); llvm::sys::path::append(Path, CRTBasename); - return std::string(Path.str()); + return std::string(Path); } const char *ToolChain::getCompilerRTArgString(const llvm::opt::ArgList &Args, @@ -783,7 +783,7 @@ ToolChain::path_list ToolChain::getArchSpecificLibPaths() const { llvm::sys::path::append(Path, "lib"); for (auto &S : SS) llvm::sys::path::append(Path, S); - Paths.push_back(std::string(Path.str())); + Paths.push_back(std::string(Path)); }; AddPath({getTriple().str()}); |