diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
commit | cfca06d7963fa0909f90483b42a6d7d194d01e08 (patch) | |
tree | 209fb2a2d68f8f277793fc8df46c753d31bc853b /lld/Common/Reproduce.cpp | |
parent | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff) |
Notes
Diffstat (limited to 'lld/Common/Reproduce.cpp')
-rw-r--r-- | lld/Common/Reproduce.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lld/Common/Reproduce.cpp b/lld/Common/Reproduce.cpp index 24210c420418..00309f58b93f 100644 --- a/lld/Common/Reproduce.cpp +++ b/lld/Common/Reproduce.cpp @@ -24,7 +24,7 @@ using namespace llvm::sys; std::string lld::relativeToRoot(StringRef path) { SmallString<128> abs = path; if (fs::make_absolute(abs)) - return path; + return std::string(path); path::remove_dots(abs, /*remove_dot_dot=*/true); // This is Windows specific. root_name() returns a drive letter @@ -45,13 +45,13 @@ std::string lld::relativeToRoot(StringRef path) { std::string lld::quote(StringRef s) { if (s.contains(' ')) return ("\"" + s + "\"").str(); - return s; + return std::string(s); } // Converts an Arg to a string representation suitable for a response file. // To show an Arg in a diagnostic, use Arg::getAsString() instead. std::string lld::toString(const opt::Arg &arg) { - std::string k = arg.getSpelling(); + std::string k = std::string(arg.getSpelling()); if (arg.getNumValues() == 0) return k; std::string v = quote(arg.getValue()); |