[llvm] r286275 - Don't store Twine in a local variable.
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 8 11:43:56 PST 2016
Author: efriedma
Date: Tue Nov 8 13:43:56 2016
New Revision: 286275
URL: http://llvm.org/viewvc/llvm-project?rev=286275&view=rev
Log:
Don't store Twine in a local variable.
Fixes post-commit review comment from r286177.
Modified:
llvm/trunk/lib/LTO/LTOCodeGenerator.cpp
Modified: llvm/trunk/lib/LTO/LTOCodeGenerator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/LTOCodeGenerator.cpp?rev=286275&r1=286274&r2=286275&view=diff
==============================================================================
--- llvm/trunk/lib/LTO/LTOCodeGenerator.cpp (original)
+++ llvm/trunk/lib/LTO/LTOCodeGenerator.cpp Tue Nov 8 13:43:56 2016
@@ -257,8 +257,7 @@ bool LTOCodeGenerator::compileOptimizedT
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;
More information about the llvm-commits
mailing list