From adcd02683856c30ba6f349279509acecd90063df Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Tue, 28 Jan 2020 20:23:46 +0100 Subject: 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. --- llvm/unittests/ExecutionEngine/Orc/RemoteObjectLayerTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/unittests/ExecutionEngine/Orc/RemoteObjectLayerTest.cpp') diff --git a/llvm/unittests/ExecutionEngine/Orc/RemoteObjectLayerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/RemoteObjectLayerTest.cpp index 429d917..31a4247 100644 --- a/llvm/unittests/ExecutionEngine/Orc/RemoteObjectLayerTest.cpp +++ b/llvm/unittests/ExecutionEngine/Orc/RemoteObjectLayerTest.cpp @@ -354,7 +354,7 @@ TEST(RemoteObjectLayer, FindSymbol) { if (Name == "foobar") return JITSymbol(0x12348765, JITSymbolFlags::Exported); if (Name == "badsymbol") - return make_error(Name); + return make_error(std::string(Name)); return nullptr; }; return 42; @@ -435,7 +435,7 @@ TEST(RemoteObjectLayer, FindSymbolIn) { [](StringRef Name, bool ExportedSymbolsOnly) -> JITSymbol { if (Name == "foobar") return JITSymbol(0x12348765, JITSymbolFlags::Exported); - return make_error(Name); + return make_error(std::string(Name)); }; // Dummy symbol table entry - this should not be visible to // findSymbolIn. @@ -443,7 +443,7 @@ TEST(RemoteObjectLayer, FindSymbolIn) { [](StringRef Name, bool ExportedSymbolsOnly) -> JITSymbol { if (Name == "barbaz") return JITSymbol(0xdeadbeef, JITSymbolFlags::Exported); - return make_error(Name); + return make_error(std::string(Name)); }; return 42; -- cgit v1.1