Commit 30ccfb29 authored by Milad Farazmand's avatar Milad Farazmand Committed by Commit Bot

[turbofan] Overload the -- operator under the LookupReturn Iterator

Changes introduced in 30ec6a89 generates compilation error in gcc 8.1.0:

8.1.0/include/c++/bits/stl_iterator_base_funcs.h:183:2:
error: no match for 'operator--' (operand type is
'v8::internal::HandlerTable::LookupReturn(int)::Iterator')
--__i;

Which maybe caused by the following change in stl_iterator_base_funcs:
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=248875

Overloading the "--" operator fixes the compilation error.


Change-Id: I32f54ddd4993375bf905996b5b1e66cd005256da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1888190
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64624}
parent 9cbc1258
...@@ -203,6 +203,10 @@ int HandlerTable::LookupReturn(int pc_offset) { ...@@ -203,6 +203,10 @@ int HandlerTable::LookupReturn(int pc_offset) {
index++; index++;
return *this; return *this;
} }
Iterator& operator--() {
index--;
return *this;
}
Iterator& operator+=(difference_type offset) { Iterator& operator+=(difference_type offset) {
index += offset; index += offset;
return *this; return *this;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment