From: Eli Friedman Date: Tue, 8 Nov 2016 19:43:56 +0000 (+0000) Subject: Don't store Twine in a local variable. X-Git-Tag: llvmorg-4.0.0-rc1~5210 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=06025cf6c738bb1e5f38a1326dac71d5fe22bbfe;p=platform%2Fupstream%2Fllvm.git Don't store Twine in a local variable. Fixes post-commit review comment from r286177. llvm-svn: 286275 --- diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp index ab4f968..5c8f9d3 100644 --- a/llvm/lib/LTO/LTOCodeGenerator.cpp +++ b/llvm/lib/LTO/LTOCodeGenerator.cpp @@ -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;