[PATCH] D114425: [clang] Add __builtin_bswap128

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 3 10:12:14 PST 2022


craig.topper added inline comments.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2930
+  }
+  [[fallthrough]];
   case Builtin::BI__builtin_bswap16:
----------------
Quuxplusone wrote:
> Re clang-format's complaint: I would either move `[[fallthrough]];` inside the curly braces, or (probably better) just eliminate the fallthrough by either duplicating line 2934 or else doing
> ```
>   case Builtin::BI__builtin_bswap64:
>   case Builtin::BI__builtin_bswap128: {
>     if (BuiltinIDIfNoAsmLabel == Builtin::BI__builtin_bswap128 && !Target.hasInt128Type())
>       CGM.ErrorUnsupported(E, "__builtin_bswap128");
>     return RValue::get(emitUnaryBuiltin(*this, E, Intrinsic::bswap));
>   }
> ```
I believe we are still using `LLVM_FALLTHROUGH` rather than `[[fallthrough]]`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114425



More information about the cfe-commits mailing list