Fix lookup of macro maps
* line-map.c (linemap_macro_map_lookup): Fix logic. From-SVN: r180427
This commit is contained in:
parent
84756fd40a
commit
3bb0c8dbb0
2 changed files with 7 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
2011-10-24 Dodji Seketeli <dodji@redhat.com>
|
||||
|
||||
* line-map.c (linemap_macro_map_lookup): Fix logic.
|
||||
|
||||
2011-10-24 Dodji Seketeli <dodji@redhat.com>
|
||||
|
||||
* include/line-map.h (linemap_expand_location): Take a line table
|
||||
|
|
|
@ -588,14 +588,14 @@ linemap_macro_map_lookup (struct line_maps *set, source_location line)
|
|||
mn = 0;
|
||||
}
|
||||
|
||||
do
|
||||
while (mn < mx)
|
||||
{
|
||||
md = (mx + mn) / 2;
|
||||
if (MAP_START_LOCATION (LINEMAPS_MACRO_MAP_AT (set, md)) > line)
|
||||
mn = md;
|
||||
mn = md + 1;
|
||||
else
|
||||
mx = md;
|
||||
} while (mx - mn > 1);
|
||||
}
|
||||
|
||||
LINEMAPS_MACRO_CACHE (set) = mx;
|
||||
result = LINEMAPS_MACRO_MAP_AT (set, LINEMAPS_MACRO_CACHE (set));
|
||||
|
|
Loading…
Add table
Reference in a new issue