summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object
diff options
context:
space:
mode:
authorMartell Malone <martellmalone@gmail.com>2017-05-20 21:00:36 +0000
committerMartell Malone <martellmalone@gmail.com>2017-05-20 21:00:36 +0000
commitd1a5d9eee5c85ad93564b6f801026a00ac4f5346 (patch)
treef40a4e551446bc76bbba5c7fa7524dce6ee837c2 /llvm/lib/Object
parent56f1de4dcbf9bde050a3a8093869d1e8abb1925c (diff)
downloadbcm5719-llvm-d1a5d9eee5c85ad93564b6f801026a00ac4f5346.tar.gz
bcm5719-llvm-d1a5d9eee5c85ad93564b6f801026a00ac4f5346.zip
COFF: Fix single StringRef return error
This should appease the lld build bot regression Intrroduced by rL303490 llvm-svn: 303493
Diffstat (limited to 'llvm/lib/Object')
-rw-r--r--llvm/lib/Object/COFFImportFile.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Object/COFFImportFile.cpp b/llvm/lib/Object/COFFImportFile.cpp
index d4890fe9999..37962d84d85 100644
--- a/llvm/lib/Object/COFFImportFile.cpp
+++ b/llvm/lib/Object/COFFImportFile.cpp
@@ -111,8 +111,8 @@ static Expected<std::string> replace(StringRef S, StringRef From,
if (Pos == StringRef::npos) {
return make_error<StringError>(
- Twine(S + ": replacing '" + From + "' with '" + To + "' failed")
- .getSingleStringRef(), object_error::parse_failed);
+ StringRef(Twine(S + ": replacing '" + From +
+ "' with '" + To + "' failed").str()), object_error::parse_failed);
}
return (Twine(S.substr(0, Pos)) + To + S.substr(Pos + From.size())).str();
OpenPOWER on IntegriCloud