[PATCH] D70798: [XCOFF][AIX] Emit TOC entries for object file generation
Digger via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 29 17:15:44 PST 2019
DiggerLin added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp:247
+private:
+ bool Is64Bit;
+
----------------
I am prefer not to added a new Is64Bit here.
PPCTargetStreamer has a data member (MCStreamer). MCStreamer->getContext()->getAsmInfo()->getCodePointerSize().
================
Comment at: llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp:254
void emitTCEntry(const MCSymbol &S) override {
- // Object writing TOC entries not supported yet.
+ unsigned PointerSize = Is64Bit ? 8 : 4;
+ Streamer.EmitValueToAlignment(PointerSize);
----------------
daltenty wrote:
> Wouldn't a use of `MAI->getCodePointerSize()` be more appropriate here
PPCTargetStreamer has a data member (MCStreamer). MCStreamer->getContext()->getAsmInfo()->getCodePointerSize().
Can we use getCodePointerSize() instead of Is64Bit?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70798/new/
https://reviews.llvm.org/D70798
More information about the llvm-commits
mailing list