diff options
Diffstat (limited to 'llvm/lib/CodeGen/SafeStackLayout.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SafeStackLayout.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SafeStackLayout.cpp b/llvm/lib/CodeGen/SafeStackLayout.cpp index b8190e0f215..fb433c1856a 100644 --- a/llvm/lib/CodeGen/SafeStackLayout.cpp +++ b/llvm/lib/CodeGen/SafeStackLayout.cpp @@ -100,7 +100,8 @@ void StackLayout::layoutObject(StackObject &Obj) { } // Split starting and ending regions if necessary. - for (StackRegion &R : Regions) { + for (unsigned i = 0; i < Regions.size(); ++i) { + StackRegion &R = Regions[i]; if (Start > R.Start && Start < R.End) { StackRegion R0 = R; R.Start = R0.End = Start; |