[Attributes] Remove AttrBuilder::hasAlignmentAttr() method (NFC)
authorNikita Popov <npopov@redhat.com>
Tue, 11 Oct 2022 07:56:37 +0000 (09:56 +0200)
committerNikita Popov <npopov@redhat.com>
Tue, 11 Oct 2022 07:56:37 +0000 (09:56 +0200)
commit454722745b4d03b173bb8bd36cdeba6b27428089
treeb405f126044202bbb147e61fa047112715034e99
parent7b7d3b20ffec9f0af0534178117a7e0c250f6a79
[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.)
llvm/include/llvm/IR/Attributes.h
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/IR/Attributes.cpp