summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objcopy/MachO/Object.h
diff options
context:
space:
mode:
authorAlexander Shaposhnikov <alexshap@fb.com>2019-11-18 15:44:58 -0800
committerAlexander Shaposhnikov <alexshap@fb.com>2019-11-19 15:16:32 -0800
commit88f00aef684ff84a6494e1f17d5466c5678f703d (patch)
treefcea95badfc8a2f1ca19fb4f5b4f90b2c328f482 /llvm/tools/llvm-objcopy/MachO/Object.h
parent28a91473e33eb3585a87514e4cf2523a9a587d82 (diff)
downloadbcm5719-llvm-88f00aef684ff84a6494e1f17d5466c5678f703d.tar.gz
bcm5719-llvm-88f00aef684ff84a6494e1f17d5466c5678f703d.zip
Introduce llvm-install-name-tool
This diff adds a new "driver" for llvm-objcopy which is supposed to emulate the behavior of install-name-tool. This is a recommit of b5913e6d2 with ubsan issues fixed. Differential revision: https://reviews.llvm.org/D69146 Test plan: make check-all
Diffstat (limited to 'llvm/tools/llvm-objcopy/MachO/Object.h')
-rw-r--r--llvm/tools/llvm-objcopy/MachO/Object.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/llvm-objcopy/MachO/Object.h b/llvm/tools/llvm-objcopy/MachO/Object.h
index fb576373074..1ce488126b3 100644
--- a/llvm/tools/llvm-objcopy/MachO/Object.h
+++ b/llvm/tools/llvm-objcopy/MachO/Object.h
@@ -74,7 +74,7 @@ struct LoadCommand {
// The raw content of the payload of the load command (located right after the
// corresponding struct). In some cases it is either empty or can be
// copied-over without digging into its structure.
- ArrayRef<uint8_t> Payload;
+ std::vector<uint8_t> Payload;
// Some load commands can contain (inside the payload) an array of sections,
// though the contents of the sections are stored separately. The struct
@@ -276,6 +276,7 @@ struct Object {
Optional<size_t> FunctionStartsCommandIndex;
void removeSections(function_ref<bool(const Section &)> ToRemove);
+ void addLoadCommand(LoadCommand LC);
};
} // end namespace macho
OpenPOWER on IntegriCloud