From 7ec82250b357791e9b4bf63ed3731f170f996641 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286275 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/LTO/LTOCodeGenerator.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/LTO/LTOCodeGenerator.cpp b/lib/LTO/LTOCodeGenerator.cpp index ab4f9681880..5c8f9d31ebc 100644 --- a/lib/LTO/LTOCodeGenerator.cpp +++ b/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.40.0