summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-11-06 09:21:54 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-11-06 09:21:54 +0000
commit4be70dd963704994fb38bd78adc42af355860a33 (patch)
tree5b75ca32b81a20218b9d1044843637d900ccd0d0 /clang/lib/Driver/ToolChains.cpp
parentaee36a196a6e102ea9bdf175a12522a5e9700655 (diff)
downloadbcm5719-llvm-4be70dd963704994fb38bd78adc42af355860a33.tar.gz
bcm5719-llvm-4be70dd963704994fb38bd78adc42af355860a33.zip
Switch some of these interfaces from std::string to StringRef and Twine.
This will facilitate further use and recombinations of them. llvm-svn: 143869
Diffstat (limited to 'clang/lib/Driver/ToolChains.cpp')
-rw-r--r--clang/lib/Driver/ToolChains.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp
index df01fc9d789..0a8aa7a4a7c 100644
--- a/clang/lib/Driver/ToolChains.cpp
+++ b/clang/lib/Driver/ToolChains.cpp
@@ -1780,9 +1780,8 @@ void Linux::GCCInstallationDetector::ScanLibDirForGCCTriple(
}
}
-static void addPathIfExists(const std::string &Path,
- ToolChain::path_list &Paths) {
- if (llvm::sys::fs::exists(Path)) Paths.push_back(Path);
+static void addPathIfExists(Twine Path, ToolChain::path_list &Paths) {
+ if (llvm::sys::fs::exists(Path)) Paths.push_back(Path.str());
}
/// \brief Get our best guess at the multiarch triple for a target.
@@ -1823,8 +1822,8 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple &Triple)
// OpenSuse stores the linker with the compiler, add that to the search
// path.
ToolChain::path_list &PPaths = getProgramPaths();
- PPaths.push_back(GCCInstallation.getParentLibPath() + "/../" +
- GCCInstallation.getTriple() + "/bin");
+ PPaths.push_back(Twine(GCCInstallation.getParentLibPath() + "/../" +
+ GCCInstallation.getTriple() + "/bin").str());
Linker = GetProgramPath("ld");
OpenPOWER on IntegriCloud