From: Peter Collingbourne Date: Thu, 19 Jan 2017 23:10:14 +0000 (+0000) Subject: LTO: Flush the resolution file after writing to it. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc38a32106cb2df38bc4f777b3e650f941a6fa8f;p=llvm LTO: Flush the resolution file after writing to it. Without this the file could be truncated if the linker crashes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292532 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/LTO/LTO.cpp b/lib/LTO/LTO.cpp index e3e2f9f806c..0f22207c3fa 100644 --- a/lib/LTO/LTO.cpp +++ b/lib/LTO/LTO.cpp @@ -372,6 +372,7 @@ static void writeToResolutionFile(raw_ostream &OS, InputFile *Input, OS << 'x'; OS << '\n'; } + OS.flush(); assert(ResI == Res.end()); }