diff options
author | Alp Toker <alp@nuanti.com> | 2013-11-08 08:07:19 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2013-11-08 08:07:19 +0000 |
commit | 07ce1d0282ca9819e98fa8b32d2d3a50229953e3 (patch) | |
tree | c5f3348f264b20beecad6ec3ca152649b428b392 /llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp | |
parent | e994ebda149c86ba3cb9ab80c5f0c597e1c342bc (diff) | |
download | llvm-07ce1d0282ca9819e98fa8b32d2d3a50229953e3.zip llvm-07ce1d0282ca9819e98fa8b32d2d3a50229953e3.tar.gz llvm-07ce1d0282ca9819e98fa8b32d2d3a50229953e3.tar.bz2 |
clang-format: Write files atomically
Switch clang-format over to Rewriter::overwriteChangedFiles().
The previous implementation was attempting to stream back directly to the
original file and failing if it was already memory mapped by MemoryBuffer,
an operation unsupported by Windows.
MemoryBuffer generally mmaps files larger than the physical page size so
this will have been difficult to reproduce consistently.
This change also reduces flicker in code editors and IDEs on all platforms
when reformatting in-place.
Note that other incorrect uses of MemoryBuffer exist in LLVM/clang and
will need a similar fix.
A test should be added for Windows when libFormat performance issues are
fixed (it takes longer than a day to format a 1MB file at present!)
llvm-svn: 194250
Diffstat (limited to 'llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions