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 | 58ffcfbffac0e8f9400b64f2233fce75742e9daf (patch) | |
| tree | 5fa6b306b02a1e997ae3513727457c7944ec1191 /llvm/lib | |
| parent | 6c2c3e07bfaa1a021bf665971b018491a728a895 (diff) | |
| download | bcm5719-llvm-58ffcfbffac0e8f9400b64f2233fce75742e9daf.tar.gz bcm5719-llvm-58ffcfbffac0e8f9400b64f2233fce75742e9daf.zip | |
LTO: Flush the resolution file after writing to it.
Without this the file could be truncated if the linker crashes.
llvm-svn: 292532
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/LTO/LTO.cpp | 1 | 
1 files changed, 1 insertions, 0 deletions
| diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp index e3e2f9f806c..0f22207c3fa 100644 --- a/llvm/lib/LTO/LTO.cpp +++ b/llvm/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());  } | 

