File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -1780,9 +1780,8 @@ void Linux::GCCInstallationDetector::ScanLibDirForGCCTriple(
1780
1780
}
1781
1781
}
1782
1782
1783
- static void addPathIfExists (const std::string &Path,
1784
- ToolChain::path_list &Paths) {
1785
- if (llvm::sys::fs::exists (Path)) Paths.push_back (Path);
1783
+ static void addPathIfExists (Twine Path, ToolChain::path_list &Paths) {
1784
+ if (llvm::sys::fs::exists (Path)) Paths.push_back (Path.str ());
1786
1785
}
1787
1786
1788
1787
// / \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)
1823
1822
// OpenSuse stores the linker with the compiler, add that to the search
1824
1823
// path.
1825
1824
ToolChain::path_list &PPaths = getProgramPaths ();
1826
- PPaths.push_back (GCCInstallation.getParentLibPath () + " /../" +
1827
- GCCInstallation.getTriple () + " /bin" );
1825
+ PPaths.push_back (Twine ( GCCInstallation.getParentLibPath () + " /../" +
1826
+ GCCInstallation.getTriple () + " /bin" ). str () );
1828
1827
1829
1828
Linker = GetProgramPath (" ld" );
1830
1829
Original file line number Diff line number Diff line change @@ -396,13 +396,13 @@ class LLVM_LIBRARY_VISIBILITY Linux : public Generic_ELF {
396
396
bool isValid () const { return IsValid; }
397
397
398
398
// / \brief Get the GCC triple for the detected install.
399
- const std::string & getTriple () const { return GccTriple; }
399
+ StringRef getTriple () const { return GccTriple; }
400
400
401
401
// / \brief Get the detected GCC installation path.
402
- const std::string & getInstallPath () const { return GccInstallPath; }
402
+ StringRef getInstallPath () const { return GccInstallPath; }
403
403
404
404
// / \brief Get the detected GCC parent lib path.
405
- const std::string & getParentLibPath () const { return GccParentLibPath; }
405
+ StringRef getParentLibPath () const { return GccParentLibPath; }
406
406
407
407
private:
408
408
static void CollectLibDirsAndTriples (llvm::Triple::ArchType HostArch,
You can’t perform that action at this time.
0 commit comments