Lines Matching defs:location

84 /* Rebuild the hash table from the location adhoc data.  */
159 /* Return the location for the adhoc loc. */
207 macro maps are allocated in different memory location. */
214 different memory location than an ordinary map. */
325 location inside the "includer" right after the #include
415 encodes the source location of the expansion point of the macro as
416 well as the "original" source location of each token that is part
420 map should encode source locations for. EXPANSION is the location
423 of the macro, rather than the the location of the first character
468 /* Create and return a virtual location for a token that is part of a
476 MAP is the map into which the source location is created. TOKEN_NO
480 ORIG_LOC is the location of the token outside of this macro
483 is a location in the context of the caller of this macro expansion
484 (which is a virtual location or a source location if the caller is
487 ORIG_PARM_REPLACEMENT_LOC is the location in the macro definition,
590 linemap_line_start, i.e, the last source line which a location was
620 /* Encode and return a source location from a given line and
636 /* Encode and return a source_location starting from location LOC and
653 /* Adding an offset to a reserved location (like
655 sense. So let's leave the location intact in that case. */
659 /* We find the real location and shift it. */
661 /* The new location (loc + offset) should be higher than the first
662 location encoded by MAP. */
666 /* If MAP is not the last line map of its set, then the new location
667 (loc + offset) should be less than the first location encoded by
688 /* Given a virtual source location yielded by a map (either an
701 /* Given a source location yielded by an ordinary map, returns that
749 /* Given a source location yielded by a macro map, returns that map.
808 macro expansion return the location of the macro expansion point.
815 source_location location ATTRIBUTE_UNUSED)
818 && location >= MAP_START_LOCATION (map));
821 linemap_assert ((location - MAP_START_LOCATION (map))
827 /* LOCATION is the source location of a token that belongs to a macro
830 Return the location of the token at the definition point of the
835 source_location location)
840 && location >= MAP_START_LOCATION (map));
841 linemap_assert (location >= RESERVED_LOCATION_COUNT);
843 token_no = location - MAP_START_LOCATION (map);
846 location = MACRO_MAP_LOCATIONS (map)[2 * token_no + 1];
848 return location;
855 In other words, this returns the xI location presented in the
859 source_location location)
864 && location >= MAP_START_LOCATION (map));
865 linemap_assert (location >= RESERVED_LOCATION_COUNT);
867 token_no = location - MAP_START_LOCATION (map);
870 location = MACRO_MAP_LOCATIONS (map)[2 * token_no];
872 return location;
875 /* Return the source line number corresponding to source location
877 LOCATION is the source location of token that is part of the
883 source_location location)
887 if (IS_ADHOC_LOC (location))
888 location = set->location_adhoc_data_map.data[location
891 if (location < RESERVED_LOCATION_COUNT)
894 location =
895 linemap_macro_loc_to_exp_point (set, location, &map);
897 return SOURCE_LINE (map, location);
900 /* Return the path of the file corresponding to source code location
903 If LOCATION is the source location of token that is part of the
911 source_location location)
915 if (IS_ADHOC_LOC (location))
916 location = set->location_adhoc_data_map.data[location
919 if (location < RESERVED_LOCATION_COUNT)
922 location =
923 linemap_macro_loc_to_exp_point (set, location, &map);
949 source_location location)
953 if (IS_ADHOC_LOC (location))
954 location = set->location_adhoc_data_map.data[location
957 if (location < RESERVED_LOCATION_COUNT)
963 map = linemap_lookup (set, location);
973 linemap_macro_map_loc_unwind_toward_spelling (map, location);
977 location = linemap_macro_map_loc_to_exp_point (map, location);
979 location = loc;
988 /* Return TRUE if LOCATION is a source code location of a token coming
994 source_location location)
996 if (IS_ADHOC_LOC (location))
997 location = set->location_adhoc_data_map.data[location
1000 linemap_assert (location <= MAX_SOURCE_LOCATION
1005 return (location > set->highest_location);
1011 virtual location of the token inside the resulting macro. */
1050 virtual location of the token inside the resulting macro, upon
1066 /* Return a positive value if PRE denotes the location of a token that
1067 comes before the token of POST, 0 if PRE denotes the location of
1133 /* Return the spelling location of the token wherever it comes from,
1140 source_location location,
1145 if (IS_ADHOC_LOC (location))
1146 location = set->location_adhoc_data_map.data[location
1149 linemap_assert (set && location >= RESERVED_LOCATION_COUNT);
1153 map = (struct line_map*) linemap_lookup (set, location);
1157 location =
1158 linemap_macro_map_loc_unwind_toward_spelling (map, location);
1163 return location;
1166 /* If LOCATION is the source location of a token that belongs to a
1168 return the location of the token at the definition point of the
1170 location come from. ORIGINAL_MAP is an output parm. If non NULL,
1172 returned location comes from.
1178 source_location location,
1183 if (IS_ADHOC_LOC (location))
1184 location = set->location_adhoc_data_map.data[location
1187 linemap_assert (set && location >= RESERVED_LOCATION_COUNT);
1191 map = (struct line_map*) linemap_lookup (set, location);
1195 location =
1196 linemap_macro_map_loc_to_def_point (map, location);
1201 return location;
1204 /* If LOCATION is the source location of a token that belongs to a
1206 the location of the topmost expansion point of the macro. We say
1208 expansion, the function returns the source location of the first
1211 Otherwise, return LOCATION. SET is the set of maps location come
1214 location comes from.
1220 source_location location,
1225 if (IS_ADHOC_LOC (location))
1226 location = set->location_adhoc_data_map.data[location
1229 linemap_assert (set && location >= RESERVED_LOCATION_COUNT);
1233 map = (struct line_map*) linemap_lookup (set, location);
1236 location = linemap_macro_map_loc_to_exp_point (map, location);
1241 return location;
1244 /* Resolve a virtual location into either a spelling location, an
1245 expansion point location or a token argument replacement point
1246 location. Return the map that encodes the virtual location as well
1247 as the resolved location.
1249 If LOC is *NOT* the location of a token resulting from the
1251 Location Resolution Kind) is ignored and the resulting location
1254 Now if LOC *IS* the location of a token resulting from the
1260 The virtual location is resolved to the first macro expansion point
1266 The virtual location is resolved to the locus where the token has
1273 The virtual location is resolved to the locus of the token in the
1278 of the macro] the virtual location is resolved to the locus of the
1287 returned location. Note that if the returned location wasn't originally
1289 resolves to a location reserved for the client code, like
1303 /* A reserved location wasn't encoded in a map. Let's return a
1329 Suppose that LOC is the virtual location of a token T coming from
1331 location L of the point where M got expanded. If L is a spelling
1332 location inside a macro expansion M', then this function returns
1334 function returns the location of T in the context that triggered
1338 to the map of the returned location. */
1365 /* If LOC is the virtual location of a token coming from the expansion
1366 of a macro M and if its spelling location is reserved (e.g, a
1367 location for a built-in token), then this function unwinds (using
1368 linemap_unwind_toward_expansion) the location until a location that
1370 words, this unwinds the reserved location until a location that is
1373 Otherwise, if the spelling location for LOC is not reserved or if
1377 *MAP is set to the map of the returned location if the later is
1417 /* Expand source code location LOC and return a user readable source
1418 code location. LOC must be a spelling (non-virtual) location. If
1419 it's a location < RESERVED_LOCATION_COUNT a zeroed expanded source
1420 location is returned. */
1439 /* The location for this token wasn't generated from a line map.
1440 It was probably a location for a builtin token, chosen by some
1441 client code. Let's not try to expand the location in that
1444 /* We shouldn't be getting a NULL map with a location that is not
1516 /* Dump debugging information about source location LOC into the file
1525 source_location location;
1535 location =
1540 linemap_assert (location < RESERVED_LOCATION_COUNT);
1544 l = SOURCE_LINE (map, location);
1545 c = SOURCE_COLUMN (map, location);
1547 e = location != loc;
1557 E: macro expansion?, LOC: original location, R: resolved location */
1559 path, from, l, c, s, (void*)map, e, loc, location);
1562 /* Return the highest location emitted for a given file for which
1565 location emitted for that file. */
1589 /* The highest location for a given map is either the starting
1590 location of the next map minus one, or -- if the map is the
1591 latest one -- the highest location of the set. */
1681 fprintf (stream, "Highest location: %u\n", set->highest_location);