summaryrefslogtreecommitdiff
path: root/lib/Object/COFFImportFile.cpp
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
commit69f0d8825b764ce03e55bad4bc2bbb8038fe90fa (patch)
tree6b910b739ae41efc0f605a250a86008b00bd9398 /lib/Object/COFFImportFile.cpp
parentec718cbf104d953893337bc39f2c4f849a1f9ee5 (diff)
COFF: Fix single StringRef return error
This should appease the lld build bot regression Intrroduced by rL303490 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303493 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Object/COFFImportFile.cpp')
-rw-r--r--lib/Object/COFFImportFile.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Object/COFFImportFile.cpp b/lib/Object/COFFImportFile.cpp
index d4890fe9999..37962d84d85 100644
--- a/lib/Object/COFFImportFile.cpp
+++ b/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();