[PATCH] D127637: [MC][MachO] Change addrsig format + ensure its size is properly set
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 12 00:31:32 PDT 2022
int3 added inline comments.
================
Comment at: llvm/lib/MC/MCMachOStreamer.cpp:609
+ // actually be applied by the linker.
+ Frag->getContents().resize(8);
}
----------------
steven_wu wrote:
> int3 wrote:
> > could use the actual machine pointer size here, but I'm not sure how to check for 64/32 bit elegantly here. `MCMachObjectTargetWriter::is64Bit()` exists, but that would require downcasting `writer` here which seems kinda ugly
> You can just add `is64Bit()` to `MachObjectWriter` which just return `TargetObjectWriter->is64Bit()`.
Not sure I understand this. `MachObjectWriter::is64Bit()` already exists; the problem is that I don't seem to have access to `MachObjectWriter` here without doing a `static_cast` on `writer`.
(I know I said `MCMachObjectTargetWriter` instead of `MachObjectWriter` in my earlier comment, but I mixed the two up. Regardless they both have an `is64Bit` method.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127637/new/
https://reviews.llvm.org/D127637
More information about the llvm-commits
mailing list