summaryrefslogtreecommitdiff
path: root/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-05-29 16:26:31 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-05-29 16:26:31 +0000
commit61b440f5005f0bf4e5864ba9cff4107ac56be404 (patch)
tree7d21c36d6cfd2c3053c6673f6303dceb45bc07c6 /source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime
parentfb19dde5bfd42a03786ee50e6b300e47c45ace47 (diff)
Notes
Diffstat (limited to 'source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime')
-rw-r--r--source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp7
1 files changed, 4 insertions, 3 deletions
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;
}
}