[llvm] r286275 - Don't store Twine in a local variable.
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 8 13:06:58 PST 2016
Thanks!
Teresa
On Tue, Nov 8, 2016 at 11:43 AM, Eli Friedman via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> 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;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
--
Teresa Johnson | Software Engineer | tejohnson at google.com | 408-460-2413
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161108/10e589cb/attachment.html>
More information about the llvm-commits
mailing list