diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2017-01-19 23:10:14 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2017-01-19 23:10:14 +0000 |
commit | dc38a32106cb2df38bc4f777b3e650f941a6fa8f (patch) | |
tree | 1f9120b94f3cd0afe28abe3af08c00708e05dc71 /lib/LTO/LTO.cpp | |
parent | 2037eb7f158f6a7b745b1c8d7be2f7015d8bca38 (diff) |
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
Diffstat (limited to 'lib/LTO/LTO.cpp')
-rw-r--r-- | lib/LTO/LTO.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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()); } |