[PATCH] D21514: Rationalise the attribute getter/setter methods on Function and CallSite.
Amaury SECHET via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 11 10:38:43 PDT 2016
deadalnix added inline comments.
================
Comment at: include/llvm/IR/CallSite.h:312
@@ -311,3 +311,1 @@
- void addAttribute(unsigned i, StringRef Kind, StringRef Value) {
- CALLSITE_DELEGATE_SETTER(addAttribute(i, Kind, Value));
----------------
ahatanak wrote:
> What's the reason you are removing this method, but not removeAttribute(unsigned i, StringRef Kind)? Since you are trying to make the API more consistent, it seems to me that you should remove that too or keep this one?
There is an addAttribute and this one is defined inconsistently. The fact that some override exists and some other do not depending on what you set attribute on makes it very inconvenient to work with it.
Alternatively, we could define this everywhere, but it didn't seemed to be used enough (one callsite in LLVM and one in clang) to be worth it.
http://reviews.llvm.org/D21514
More information about the llvm-commits
mailing list