diff options
author | Raphael Isemann <teemperor@gmail.com> | 2019-11-25 15:03:46 +0100 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2019-11-25 15:03:46 +0100 |
commit | d1782133d96d316c3bc98e33a191994794a26851 (patch) | |
tree | b34395755e063b8df5d970569a6d8421d78e9d64 /lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime | |
parent | d9c9a4e48d286a04d09a8fdea87f486a9ec02cd0 (diff) | |
download | bcm5719-llvm-d1782133d96d316c3bc98e33a191994794a26851.tar.gz bcm5719-llvm-d1782133d96d316c3bc98e33a191994794a26851.zip |
[lldb][NFC] Allow range-based for-loops on VariableList
Summary:
Adds support for doing range-based for-loops on LLDB's VariableList and
modernises all the index-based for-loops in LLDB where possible.
Reviewers: labath, jdoerfert
Reviewed By: labath
Subscribers: JDevlieghere, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D70668
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime')
-rw-r--r-- | lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp index 5200749d759..e612e15ee78 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp @@ -2240,8 +2240,7 @@ void RenderScriptRuntime::FindStructTypeName(Element &elem, // Iterate over all the global variables looking for one with a matching type // to the Element. We make the assumption a match exists since there needs to // be a global variable to reflect the struct type back into java host code. - for (uint32_t i = 0; i < var_list.GetSize(); ++i) { - const VariableSP var_sp(var_list.GetVariableAtIndex(i)); + for (const VariableSP &var_sp : var_list) { if (!var_sp) continue; |