Fixes post-commit review comment from r286177.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286275
91177308-0d34-0410-b5e6-
96231b3b80d8
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;