llvm-project/llvm/lib/Support/Windows
Duncan P. N. Exon Smith 0db6488a77 Support: Add move semantics to mapped_file_region
Update llvm::sys::fs::mapped_file_region to have a move constructor and
a move assignment operator, allowing it to be used as an Optional. Also,
update FileOutputBuffer's OnDiskBuffer to take advantage of this,
avoiding an extra allocation from the unique_ptr.

A nice follow-up would be to make the mapped_file_region constructor
private and replace its use with a factory function, such as
mapped_file_region::create(), that returns an Expected (or ErrorOr). I
don't plan on doing that immediately, but I might swing back later.

No functionality change, besides the saved allocation in OnDiskBuffer.

Differential Revision: https://reviews.llvm.org/D100159
2021-04-09 17:56:26 -07:00
..
COM.inc
DynamicLibrary.inc llvm-ar: Fix MinGW compilation 2020-02-28 09:59:24 +01:00
Host.inc llvm-ar: Fix MinGW compilation 2020-02-28 09:59:24 +01:00
Memory.inc llvm-ar: Fix MinGW compilation 2020-02-28 09:59:24 +01:00
Path.inc Support: Add move semantics to mapped_file_region 2021-04-09 17:56:26 -07:00
Process.inc Support: Avoid SmallVector::assign with a range from to-be-replaced vector in Windows GetExecutableName 2020-11-18 17:55:49 -08:00
Program.inc [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
Signals.inc Pass -fcrash-diagnostics-dir along to LLVM 2021-04-06 09:30:52 -07:00
ThreadLocal.inc llvm-ar: Fix MinGW compilation 2020-02-28 09:59:24 +01:00
Threading.inc Re-land [Support] On Windows, take the affinity mask into account 2021-01-14 17:03:22 -05:00
Watchdog.inc
explicit_symbols.inc