[PATCH] D105485: [IR] Use a proper type for AttributeList indexing
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 6 08:16:04 PDT 2021
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp:641
ArgInfo OrigArg(VRegs[Idx], Arg);
- const unsigned OrigArgIdx = Idx + AttributeList::FirstArgIndex;
- setArgFlags(OrigArg, OrigArgIdx, DL, F);
+ setArgFlags(OrigArg, AttributeList::Index::getArgIndex(Idx), DL, F);
----------------
This is just a drive-by comment, so feel free to ignore, but for client code like this it would be nicer if we could just write `AttributeList::getArgIndex`. (It already says `Index` in the function name so why do I have to qualify it with `Index::` as well?)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105485/new/
https://reviews.llvm.org/D105485
More information about the llvm-commits
mailing list