[llvm] r303493 - COFF: Fix single StringRef return error
Martell Malone via llvm-commits
llvm-commits at lists.llvm.org
Sat May 20 14:00:36 PDT 2017
Author: martell
Date: Sat May 20 16:00:36 2017
New Revision: 303493
URL: http://llvm.org/viewvc/llvm-project?rev=303493&view=rev
Log:
COFF: Fix single StringRef return error
This should appease the lld build bot regression
Intrroduced by rL303490
Modified:
llvm/trunk/lib/Object/COFFImportFile.cpp
Modified: llvm/trunk/lib/Object/COFFImportFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/COFFImportFile.cpp?rev=303493&r1=303492&r2=303493&view=diff
==============================================================================
--- llvm/trunk/lib/Object/COFFImportFile.cpp (original)
+++ llvm/trunk/lib/Object/COFFImportFile.cpp Sat May 20 16:00:36 2017
@@ -111,8 +111,8 @@ static Expected<std::string> replace(Str
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();
More information about the llvm-commits
mailing list