[all-commits] [llvm/llvm-project] 454722: [Attributes] Remove AttrBuilder::hasAlignmentAttr(...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Oct 11 01:06:58 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 454722745b4d03b173bb8bd36cdeba6b27428089
      https://github.com/llvm/llvm-project/commit/454722745b4d03b173bb8bd36cdeba6b27428089
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-10-11 (Tue, 11 Oct 2022)

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

  Log Message:
  -----------
  [Attributes] Remove AttrBuilder::hasAlignmentAttr() method (NFC)

This was the odd one out, with similar methods not existing for
any other attributes. In the places where it is used, it is best
replaced by AttrBuilder::getAttribute(), which allows us to both
test for presence of the attribute and retrieve its value at the
same time. (To just check for presence, contains() could be used.)




More information about the All-commits mailing list