aboutsummaryrefslogtreecommitdiff
path: root/libcpp/line-map.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2018-10-31 14:57:13 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2018-10-31 14:57:13 +0000
commit87bacc2b392f48951491bf6454d7d6bcde127c90 (patch)
tree2f2758bb919239d08146f1801e6c722d58eb633c /libcpp/line-map.c
parentc9fb347ea14cd8f519a71374c97547044413a71f (diff)
downloadgcc-87bacc2b392f48951491bf6454d7d6bcde127c90.zip
gcc-87bacc2b392f48951491bf6454d7d6bcde127c90.tar.gz
gcc-87bacc2b392f48951491bf6454d7d6bcde127c90.tar.bz2
[4/7] Preprocessor location-kind predicates
https://gcc.gnu.org/ml/gcc-patches/2018-10/msg02040.html * include/line-map.h (IS_ORDINARY_LOC, IS_MACRO_LOC): New predicates. (IS_ADHOC_LOC): Move earlier. (MAP_ORDINARY_P): Use IS_ORDINARY_LOC. * line-map.c (linemap_location_from_macro_expansion_p): Use IS_MACRO_LOC. From-SVN: r265689
Diffstat (limited to 'libcpp/line-map.c')
-rw-r--r--libcpp/line-map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcpp/line-map.c b/libcpp/line-map.c
index 66d92cf..2d3ed83 100644
--- a/libcpp/line-map.c
+++ b/libcpp/line-map.c
@@ -1238,7 +1238,7 @@ linemap_location_from_macro_expansion_p (const struct line_maps *set,
location = set->location_adhoc_data_map.data[location
& MAX_SOURCE_LOCATION].locus;
- return location >= LINE_MAP_MAX_LOCATION;
+ return IS_MACRO_LOC (location);
}
/* Given two virtual locations *LOC0 and *LOC1, return the first