[all-commits] [llvm/llvm-project] c96934: [NFC] Rename attribute methods that work with indexes
aeubanks via All-commits
all-commits at lists.llvm.org
Wed Sep 1 10:44:13 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c9693492600e3899015a1b9134aa879e9e72bb81
https://github.com/llvm/llvm-project/commit/c9693492600e3899015a1b9134aa879e9e72bb81
Author: Arthur Eubanks <aeubanks at google.com>
Date: 2021-09-01 (Wed, 01 Sep 2021)
Changed paths:
M llvm/include/llvm/IR/Attributes.h
M llvm/include/llvm/IR/Function.h
M llvm/include/llvm/IR/InstrTypes.h
M llvm/lib/IR/Attributes.cpp
M llvm/lib/IR/Function.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list