[PATCH] D113630: Add support for chained fixup load commands to MachOObjectFile
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 10 22:09:29 PST 2022
JDevlieghere added inline comments.
================
Comment at: llvm/lib/Object/MachOObjectFile.cpp:3257-3270
+MachOChainedFixupEntry::MachOChainedFixupEntry(Error *E,
+ const MachOObjectFile *O,
+ FixupKind Kind, bool Parse)
+ : MachOAbstractFixupEntry(E, O), Kind(Kind) {
+ ErrorAsOutParameter e(E);
+ if (Parse) {
+ if (auto FixupTargetsOrErr = O->getDyldChainedFixupTargets())
----------------
Could this be a static factory method that returns an `Expected<MachOChainedFixupEntry>`?
================
Comment at: llvm/lib/Object/MachOObjectFile.cpp:4306-4310
+ MachOChainedFixupEntry Start(&Err, this, Kind, true);
+ Start.moveToFirst();
+
+ MachOChainedFixupEntry Finish(&Err, this, Kind, false);
+ Finish.moveToEnd();
----------------
If `Start` fails but `Finish` succeeds, won't this trigger the unchecked Error assert?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113630/new/
https://reviews.llvm.org/D113630
More information about the llvm-commits
mailing list