aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2020-01-28 20:23:46 +0100
committerBenjamin Kramer <benny.kra@googlemail.com>2020-01-28 23:25:25 +0100
commitadcd02683856c30ba6f349279509acecd90063df (patch)
tree7b5927ef2ecab1618842183fac5ebe848f5832dd /lld/unittests/DriverTests
parent[lldb] Delete ValueObject::GetBaseClassPath (diff)
downloadllvm-project-adcd02683856c30ba6f349279509acecd90063df.tar.gz
llvm-project-adcd02683856c30ba6f349279509acecd90063df.tar.bz2
llvm-project-adcd02683856c30ba6f349279509acecd90063df.zip
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here. This is mostly mechanical from a custom clang-tidy check, with a lot of manual fixups. It uncovers a lot of minor inefficiencies. This doesn't actually modify StringRef yet, I'll do that in a follow-up.
Diffstat (limited to 'lld/unittests/DriverTests')
-rw-r--r--lld/unittests/DriverTests/DarwinLdDriverTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/unittests/DriverTests/DarwinLdDriverTest.cpp b/lld/unittests/DriverTests/DarwinLdDriverTest.cpp
index 80666702511c..af0fbbeef2a5 100644
--- a/lld/unittests/DriverTests/DarwinLdDriverTest.cpp
+++ b/lld/unittests/DriverTests/DarwinLdDriverTest.cpp
@@ -31,7 +31,7 @@ class DarwinLdParserTest : public testing::Test {
protected:
int inputFileCount() { return _ctx.getNodes().size(); }
- std::string inputFile(int index) {
+ StringRef inputFile(int index) {
Node &node = *_ctx.getNodes()[index];
if (node.kind() == Node::Kind::File)
return cast<FileNode>(&node)->getFile()->path();