From 61b440f5005f0bf4e5864ba9cff4107ac56be404 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 29 May 2017 16:26:31 +0000 Subject: Vendor import of lldb trunk r304149: https://llvm.org/svn/llvm-project/lldb/trunk@304149 --- .../RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime') diff --git a/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp b/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp index 3ceda5ff67e98..439d372fadebe 100644 --- a/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp +++ b/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp @@ -254,11 +254,12 @@ bool fixupRSAllocationStructByValCalls(llvm::Module &module) { llvm::AttributeList call_attribs = call_inst->getAttributes(); // iterate over the argument attributes - for (size_t i = 1; i <= call_attribs.getNumSlots(); ++i) { + for (unsigned I = call_attribs.index_begin(); I != call_attribs.index_end(); + I++) { // if this argument is passed by val - if (call_attribs.hasAttribute(i, llvm::Attribute::ByVal)) { + if (call_attribs.hasAttribute(I, llvm::Attribute::ByVal)) { // strip away the byval attribute - call_inst->removeAttribute(i, llvm::Attribute::ByVal); + call_inst->removeAttribute(I, llvm::Attribute::ByVal); changed = true; } } -- cgit v1.2.3