From a7b4ce9cfd110db56d89fa8d76b39023d038de11 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Thu, 30 Sep 2021 13:57:55 -0700 Subject: [NFC][AttributeList] Replace index_begin/end with an iterator We expose the fact that we rely on unsigned wrapping to iterate through all indexes. This can be confusing. Rather, keeping it as an implementation detail through an iterator is less confusing and is less code. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D110885 --- .../RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp') diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp index edfadc94debe..bb09b5e171f0 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp @@ -237,8 +237,7 @@ bool fixupRSAllocationStructByValCalls(llvm::Module &module) { llvm::AttributeList call_attribs = call_inst->getAttributes(); // iterate over the argument attributes - for (unsigned I = call_attribs.index_begin(); I != call_attribs.index_end(); - I++) { + for (unsigned I : call_attribs.indexes()) { // if this argument is passed by val if (call_attribs.hasAttributeAtIndex(I, llvm::Attribute::ByVal)) { // strip away the byval attribute -- cgit v1.2.3