From 06025cf6c738bb1e5f38a1326dac71d5fe22bbfe Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Tue, 8 Nov 2016 19:43:56 +0000 Subject: [PATCH] Don't store Twine in a local variable. Fixes post-commit review comment from r286177. llvm-svn: 286275 --- llvm/lib/LTO/LTOCodeGenerator.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; -- 2.7.4