[NFC] Rename attribute methods that work with indexes
authorArthur Eubanks <aeubanks@google.com>
Fri, 20 Aug 2021 17:49:36 +0000 (10:49 -0700)
committerArthur Eubanks <aeubanks@google.com>
Wed, 1 Sep 2021 17:43:14 +0000 (10:43 -0700)
commitc9693492600e3899015a1b9134aa879e9e72bb81
tree056a2b3e8bb4d61fb6c5544ca55e461b57e2698a
parentfec4749200e0068494d8a6cd80b5b6f91403cfbe
[NFC] Rename attribute methods that work with indexes

This is part one of a couple of patches to fully rename these methods.

I've made the mistake of assuming that these indexes are for parameters
multiple times, but actually they're based off of a weird indexing
scheme AttributeList::AttrIndex where 0 is the return value and ~0 is
the function. Hopefully renaming these methods will make this clearer.
Ideally users should use more specific methods like
AttributeList::getFnAttr().

This patch simply adds the name that we want in the end. This is so the
removal of the methods with the original names happens in a separate
change to make it easier for downstream users.

This touches all relevant methods in AttributeList, CallBase, and Function.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D108788
llvm/include/llvm/IR/Attributes.h
llvm/include/llvm/IR/Function.h
llvm/include/llvm/IR/InstrTypes.h
llvm/lib/IR/Attributes.cpp
llvm/lib/IR/Function.cpp