[PATCH] D126479: [Clang] Allow 'Complex float __attribute__((mode(HC)))'

Jolanta Jensen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 12 07:04:55 PDT 2022


jolanta.jensen added inline comments.


================
Comment at: clang/include/clang/Basic/TargetInfo.h:223-224
   unsigned HasAlignMac68kSupport : 1;
-  unsigned RealTypeUsesObjCFPRet : 3;
+  unsigned RealTypeUsesObjCFPRet : (1 << (int)FloatModeKind::Float) |
+                                   (1 << (int)FloatModeKind::Double);
   unsigned ComplexLongDoubleUsesFP2Ret : 1;
----------------
tahonermann wrote:
> This doesn't look right to me. The size of the bit field would be `(1 << 1) | (1 << 2)` which is `0b110` which is 6, but more by coincidence than by construction. I think what we want is:
>   unsigned RealTypeUsesObjCFPRet  : (int)FloatModeKind::Last + 1;
Sorry. I mixed things up.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126479



More information about the cfe-commits mailing list