[PATCH] D128182: [NFC] Switch FloatModeKind enum class to use bitmask enums

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 27 10:51:57 PDT 2022


aaron.ballman requested changes to this revision.
aaron.ballman added a subscriber: shafik.
aaron.ballman added inline comments.
This revision now requires changes to proceed.


================
Comment at: clang/include/clang/Basic/TargetInfo.h:225-226
   unsigned HasAlignMac68kSupport : 1;
-  unsigned RealTypeUsesObjCFPRetMask : (int)FloatModeKind::Last + 1;
+  unsigned RealTypeUsesObjCFPRetMask
+      : (int)FloatModeKind::LLVM_BITMASK_LARGEST_ENUMERATOR;
   unsigned ComplexLongDoubleUsesFP2Ret : 1;
----------------
Whoops, I missed this (thanks @shafik for asking me about it in private)!

I believe the original code was setting the field width to be `1 << 5` bits wide instead of specifying it as being 6 bits wide.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128182



More information about the cfe-commits mailing list