[PATCH] D96641: [XCOFF] [NFC] make StorageMappingClass/SymbolType member optional in MCSectionXCOFF class

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 13 20:16:04 PST 2021


hubert.reinterpretcast added inline comments.


================
Comment at: llvm/include/llvm/MC/MCSectionXCOFF.h:35-36
 
-  XCOFF::StorageMappingClass MappingClass;
-  XCOFF::SymbolType Type;
+  Optional<XCOFF::CsectProperties> CsectProp;
+  bool IsCsect;
   MCSymbolXCOFF *const QualName;
----------------
If `IsCsect` is true exactly when `CsectProp` is not `None`, then I suggest just using `CsectProp` and having `isCsect()` return `static_cast<bool>(CsectProp)`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96641



More information about the llvm-commits mailing list