1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

Don't store Twine in a local variable.

Fixes post-commit review comment from r286177.

llvm-svn: 286275
This commit is contained in:
Eli Friedman 2016-11-08 19:43:56 +00:00
parent 37e7b16e05
commit f6fe3c8a24

View File

@ -257,8 +257,7 @@ bool LTOCodeGenerator::compileOptimizedToFile(const char **Name) {
bool genResult = compileOptimized(&objFile.os());
objFile.os().close();
if (objFile.os().has_error()) {
Twine ErrMsg = "could not write object file: " + Filename.str();
emitError(ErrMsg.str());
emitError((Twine("could not write object file: ") + Filename).str());
objFile.os().clear_error();
sys::fs::remove(Twine(Filename));
return false;