[all-commits] [llvm/llvm-project] e000b8: [IR] Simplify Attribute::getAsString() (NFC)

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Jul 7 13:43:36 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e000b848e65c3fc7d3c153d15cd20bbd92d9427c
      https://github.com/llvm/llvm-project/commit/e000b848e65c3fc7d3c153d15cd20bbd92d9427c
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-07-07 (Wed, 07 Jul 2021)

  Changed paths:
    M llvm/lib/IR/Attributes.cpp

  Log Message:
  -----------
  [IR] Simplify Attribute::getAsString() (NFC)

Avoid enumerating all attributes here and instead use
getNameFromAttrKind(), which is based on the tablegen data.

This only leaves us with custom handling for int attributes,
which don't have uniform printing.




More information about the All-commits mailing list