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
This commit is contained in:
Martell Malone 2017-05-20 21:00:36 +00:00
parent ec718cbf10
commit 69f0d8825b

View File

@ -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();