[PATCH] D114543: Extend the `uwtable` attribute with unwind table kind

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 11 12:18:37 PST 2022


chill marked 6 inline comments as done.
chill added inline comments.


================
Comment at: llvm/lib/IR/Attributes.cpp:446
+    if (Kind != UWTableKind::None) {
+      return Kind == UWTableKind::Default
+                 ? "uwtable"
----------------
MaskRay wrote:
> clang-format wraps the continuation lines in a strange way. Perhaps switch to this form:
> 
> ```
> if (Kind == UWTableKind::Default)
>   return "uwtable";
> return ...
> ```
Yeah, that was my first variant

    if (Kind != UWTableKind::None) {
      if (Kind == UWTableKind::Default)
        return "uwtable";
      return ("uwtable(" + Twine(Kind == UWTableKind::Sync ? "sync" : "async") +
              ")")
          .str();
    }

but it looks slightly worse, IMHO.


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

https://reviews.llvm.org/D114543



More information about the llvm-commits mailing list