[Attributes] Add AttributeList ctor from AttributeSet (NFC)
authorNikita Popov <npopov@redhat.com>
Sat, 18 Dec 2021 13:56:12 +0000 (14:56 +0100)
committerNikita Popov <npopov@redhat.com>
Mon, 20 Dec 2021 10:37:01 +0000 (11:37 +0100)
commit6e30cb7673df293fd294acef7eadca8050b5a71e
tree5cdff21a2cd074f36b32898ceb6a3f05e5432c2d
parent6c2bf01270a8a52b7986d5c49eaa7ad1c7083ec5
[Attributes] Add AttributeList ctor from AttributeSet (NFC)

It was already possible to create an AttributeList from an Index
and an AttributeSet. However, this would actually end up using
the implicit constructor on AttrBuilder, thus doing an unnecessary
conversion from AttributeSet to AttrBuilder to AttributeSet.
Instead we can accept the AttributeSet directly, as that is what
we need anyway.
llvm/include/llvm/IR/Attributes.h
llvm/lib/IR/Attributes.cpp