[PATCH] D127165: [DirectX][MC] Add MC support for DXContainer

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 11 00:23:06 PDT 2022


MaskRay added inline comments.


================
Comment at: llvm/include/llvm/MC/MCSectionDXContainer.h:30
+public:
+  ~MCSectionDXContainer() = default;
+  void printSwitchToSection(const MCAsmInfo &, const Triple &, raw_ostream &,
----------------
delete


================
Comment at: llvm/lib/MC/MCDXContainerWriter.cpp:95
+    uint64_t SectionSize = Layout.getSectionAddressSize(&Sec);
+    // Skip empty sections...
+    if (SectionSize == 0)
----------------



================
Comment at: llvm/lib/MC/MCDXContainerWriter.cpp:100
+    unsigned Start = W.OS.tell();
+    // Write section header
+    W.write<char>(ArrayRef<char>(Sec.getName().data(), 4));
----------------



================
Comment at: llvm/lib/MC/MCDXContainerWriter.cpp:107
+      PartSize += sizeof(dxbc::ProgramHeader);
+    // DXContainer parts should be 4-byte aligned
+    PartSize = alignTo(PartSize, Align(4));
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127165



More information about the llvm-commits mailing list