[all-commits] [llvm/llvm-project] 42cc7f: [AttrBuilder] Make handling of type attributes mor...

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Jul 9 08:48:27 PDT 2021


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

  Changed paths:
    M llvm/include/llvm/AsmParser/LLParser.h
    M llvm/include/llvm/IR/Attributes.h
    M llvm/lib/AsmParser/LLParser.cpp
    M llvm/lib/IR/Attributes.cpp

  Log Message:
  -----------
  [AttrBuilder] Make handling of type attributes more generic (NFCI)

While working on the elementtype attribute, I felt that the type
attribute handling in AttrBuilder is overly repetitive. This patch
converts the separate Type* members into an std::array<Type*>, so
that all type attribute kinds can be handled generically.

There's more room for improvement here (especially when it comes to
converting the AttrBuilder to an Attribute), but this seems like a
good starting point.

Differential Revision: https://reviews.llvm.org/D105658




More information about the All-commits mailing list