mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-03 17:31:50 +00:00
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:
parent
ec718cbf10
commit
69f0d8825b
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user