llvm-project/llvm/tools/llvm-objcopy/MachO
Jan Svoboda d0262c2394 [llvm] Add null-termination capability to SmallVectorMemoryBuffer
Most of `MemoryBuffer` interfaces expose a `RequiresNullTerminator` parameter that's being used to:
* determine how to open a file (`mmap` vs `open`),
* assert newly initialized buffer indeed has an implicit null terminator.

This patch adds the paramater to the `SmallVectorMemoryBuffer` constructors, meaning:
* null terminator can now be added to `SmallVector`s that didn't have one before,
* `SmallVectors` that had a null terminator before keep it even after the move.

In line with existing code, the new parameter is defaulted to `true`. This patch makes sure all calls to the `SmallVectorMemoryBuffer` constructor set it to `false` to preserve the current semantics.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D115331
2021-12-09 11:32:13 +01:00
..
MachOConfig.h [llvm-objcopy][NFC] Refactor CopyConfig structure - categorize options. 2021-09-08 19:16:38 +03:00
MachOLayoutBuilder.cpp [llvm-objcopy][MachO] Add llvm-strip support for newer load commands 2021-11-17 10:36:35 -08:00
MachOLayoutBuilder.h Regenerate LC_CODE_SIGNATURE during llvm-objcopy operations 2021-10-26 14:51:13 -07:00
MachOObjcopy.cpp [llvm] Add null-termination capability to SmallVectorMemoryBuffer 2021-12-09 11:32:13 +01:00
MachOObjcopy.h [llvm-objcopy][NFC] Refactor CopyConfig structure - categorize options. 2021-09-08 19:16:38 +03:00
MachOReader.cpp [llvm-objcopy][MachO] Add llvm-strip support for newer load commands 2021-11-17 10:36:35 -08:00
MachOReader.h [llvm-objcopy][MachO] Add llvm-strip support for newer load commands 2021-11-17 10:36:35 -08:00
MachOWriter.cpp [llvm-objcopy][MachO] Add llvm-strip support for newer load commands 2021-11-17 10:36:35 -08:00
MachOWriter.h [llvm-objcopy][MachO] Add llvm-strip support for newer load commands 2021-11-17 10:36:35 -08:00
Object.cpp [llvm-objcopy][MachO] Add llvm-strip support for newer load commands 2021-11-17 10:36:35 -08:00
Object.h [llvm-objcopy] Fix some comment typos 2021-11-17 13:43:30 -05:00