[PATCH] D151793: [COFF] Use COFFSection.MCSection when writeSection

Kan Shengchen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 2 04:10:28 PDT 2023


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

LGTM with minor suggestion



================
Comment at: llvm/lib/MC/WinCOFFObjectWriter.cpp:619
     // Update the section definition auxiliary symbol to record the CRC.
-    COFFSection *Sec = SectionMap[&MCSec];
-    COFFSymbol::AuxiliarySymbols &AuxSyms = Sec->Symbol->Aux;
----------------
>From line 620, we can see that `Sec` is never a NULL pointer. So the `[]` operator should have no side effect here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151793



More information about the llvm-commits mailing list