[PATCH] D128148: [XCOFF] write the aux header when the visibility is specified in XCOFF32.

Digger Lin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 06:48:59 PDT 2022


DiggerLin accepted this revision.
DiggerLin added a comment.
This revision is now accepted and ready to land.

Look good to me. Maybe James Henderson has further comment.



================
Comment at: llvm/lib/MC/XCOFFObjectWriter.cpp:315
   size_t auxiliaryHeaderSize() const {
-    assert(!needsAuxiliaryHeader() &&
-           "Auxiliary header support not implemented.");
-    return 0;
+    return HasVisibility && !is64Bit() ? XCOFF::AuxFileHeaderSizeShort : 0;
   }
----------------
nit: move comment in side the function 
  // 64-bit object files have no auxiliary header.
   return HasVisibility && !is64Bit() ? XCOFF::AuxFileHeaderSizeShort : 0;


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128148



More information about the llvm-commits mailing list