[PATCH] D92058: [XCOFF][AIX] Alternative path in EHStreamer for platforms do not have uleb128 support

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 1 12:43:23 PST 2020


hubert.reinterpretcast added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp:420
+          ? static_cast<unsigned>(dwarf::DW_EH_PE_udata4)
+          : Asm->getObjFileLowering().getCallSiteEncoding();
   bool HaveTTData = !TypeInfos.empty() || !FilterIds.empty();
----------------
jasonliu wrote:
> hubert.reinterpretcast wrote:
> > I agree that the `MCAsmInfo` is the correct place to encode the support of LEB128 directives or lack thereof; however, I'm not sure that the code here should be overriding the `CallSiteEncoding` as opposed to having `TargetLoweringObjectFile::Initialize` set it based on `Ctx.getAsmInfo()`.
> TargetLoweringObjectFile get inheritance a lot, so setting it there means we need to override it in multiply places. And when a new TargetLoweringObjectFile derived class is created, and they might also messes the setting for `CallSiteEncoding`. I'm contemplating about overriding it in `TargetLoweringObjectFile::getCallSiteEncoding()` call instead. What do you think? 
I think that's a reasonable choice.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92058/new/

https://reviews.llvm.org/D92058



More information about the llvm-commits mailing list