[PATCH] D127637: [MC][MachO] Change addrsig format + ensure its size is properly set
Steven Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 7 09:59:17 PDT 2022
steven_wu added a comment.
LGTM in general. Some comments inline.
================
Comment at: llvm/lib/MC/MCMachOStreamer.cpp:34
#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/LEB128.h"
#include "llvm/Support/raw_ostream.h"
----------------
This is no longer needed.
================
Comment at: llvm/lib/MC/MCMachOStreamer.cpp:609
+ // actually be applied by the linker.
+ Frag->getContents().resize(8);
}
----------------
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()`.
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