[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
Mon Nov 30 13:16:41 PST 2020


hubert.reinterpretcast added inline comments.


================
Comment at: llvm/include/llvm/MC/MCAsmInfo.h:190
+  /// True if target supports .uleb128 directive.
+  bool HasULEB128Directive = true;
+
----------------
This also covers/is used for checking support for .sleb128, no? Perhaps this should be `HasLEB128Directives`?


================
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();
----------------
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()`.


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

https://reviews.llvm.org/D92058



More information about the llvm-commits mailing list