summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.h
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2021-09-01 11:32:23 -0700
committerArthur Eubanks <aeubanks@google.com>2021-09-02 12:47:22 -0700
commit85b732b55903be80a2fc0b9eb6abb7de4a931430 (patch)
tree3d09480263069005abe264e740f180d5040dcfcc /lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.h
parenta5d3cac0336b7318a4b0c1fb4a0b76e991630be6 (diff)
[NFC] Remove some unclear attribute methods
To any downstream users broken by this change, please examine your uses of these methods and see if you can use a better method. For example, getAttribute(AttributeList::FunctionIndex) => getFnAttr(), or addAttribute(AttributeList::FirstArgIndex + ArgNo) => addParamAttribute(ArgNo). 0 corresponds to ReturnIndex, ~0 corresponds to FunctionIndex. This may make future cleanups less painful. 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 touches all relevant methods in AttributeList, CallBase, and Function. This hopefully will make easier a future change to cleanup AttrIndex. A previous worry about cleaning up AttrIndex was that too many downstream users would have to look through all uses of AttrIndex and relevant attribute method calls to see if anything was unintentionally hardcoded (e.g. using 0 instead of ReturnIndex). With this change hopefully downstream users will look at existing usages of these methods and clean them up. Reviewed By: rnk, MaskRay Differential Revision: https://reviews.llvm.org/D108614
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.h')
0 files changed, 0 insertions, 0 deletions