[llvm-branch-commits] [cfe-branch] r143947 - in /cfe/branches/release_30: ./ lib/Driver/ToolChains.cpp lib/Driver/ToolChains.h
Chandler Carruth
chandlerc at gmail.com
Mon Nov 7 02:38:50 PST 2011
Author: chandlerc
Date: Mon Nov 7 04:38:50 2011
New Revision: 143947
URL: http://llvm.org/viewvc/llvm-project?rev=143947&view=rev
Log:
Merging r143869:
------------------------------------------------------------------------
r143869 | chandlerc | 2011-11-06 01:21:54 -0800 (Sun, 06 Nov 2011) | 2 lines
Switch some of these interfaces from std::string to StringRef and Twine.
This will facilitate further use and recombinations of them.
------------------------------------------------------------------------
Modified:
cfe/branches/release_30/ (props changed)
cfe/branches/release_30/lib/Driver/ToolChains.cpp
cfe/branches/release_30/lib/Driver/ToolChains.h
Propchange: cfe/branches/release_30/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Nov 7 04:38:50 2011
@@ -1,3 +1,3 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:142113,142133-142134,142187,142349,142474,142476,142918,143344-143345,143684,143686-143687,143751-143752,143798,143801,143804-143807,143822-143823,143836,143838-143842,143863,143866
+/cfe/trunk:142113,142133-142134,142187,142349,142474,142476,142918,143344-143345,143684,143686-143687,143751-143752,143798,143801,143804-143807,143822-143823,143836,143838-143842,143863,143866,143869
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_30/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_30/lib/Driver/ToolChains.cpp?rev=143947&r1=143946&r2=143947&view=diff
==============================================================================
--- cfe/branches/release_30/lib/Driver/ToolChains.cpp (original)
+++ cfe/branches/release_30/lib/Driver/ToolChains.cpp Mon Nov 7 04:38:50 2011
@@ -1782,9 +1782,8 @@
}
}
-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.
@@ -1831,8 +1830,8 @@
// 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");
Modified: cfe/branches/release_30/lib/Driver/ToolChains.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_30/lib/Driver/ToolChains.h?rev=143947&r1=143946&r2=143947&view=diff
==============================================================================
--- cfe/branches/release_30/lib/Driver/ToolChains.h (original)
+++ cfe/branches/release_30/lib/Driver/ToolChains.h Mon Nov 7 04:38:50 2011
@@ -396,13 +396,13 @@
bool isValid() const { return IsValid; }
/// \brief Get the GCC triple for the detected install.
- const std::string &getTriple() const { return GccTriple; }
+ StringRef getTriple() const { return GccTriple; }
/// \brief Get the detected GCC installation path.
- const std::string &getInstallPath() const { return GccInstallPath; }
+ StringRef getInstallPath() const { return GccInstallPath; }
/// \brief Get the detected GCC parent lib path.
- const std::string &getParentLibPath() const { return GccParentLibPath; }
+ StringRef getParentLibPath() const { return GccParentLibPath; }
private:
static void CollectLibDirsAndTriples(llvm::Triple::ArchType HostArch,
More information about the llvm-branch-commits
mailing list