[Ada] Consistently use explicit Entity_Id type instead of alias
[gcc.git] / libcpp / identifiers.c
index e456fd3a4fcac1e6ba4ba4eae2506141c488686c..9627e1bf4b0f0851ac86dae24734008b9cf838b1 100644 (file)
@@ -1,5 +1,5 @@
 /* Hash tables for the CPP library.
-   Copyright (C) 1986-2017 Free Software Foundation, Inc.
+   Copyright (C) 1986-2020 Free Software Foundation, Inc.
    Written by Per Bothner, 1994.
    Based on CCCP program by Paul Rubin, June 1986
    Adapted to ANSI C, Richard Stallman, Jan 1987
@@ -72,8 +72,7 @@ _cpp_init_hashtable (cpp_reader *pfile, cpp_hash_table *table)
   s->n__VA_ARGS__->flags |= NODE_DIAGNOSTIC;
   s->n__VA_OPT__        = cpp_lookup (pfile, DSC("__VA_OPT__"));
   s->n__VA_OPT__->flags |= NODE_DIAGNOSTIC;
-  s->n__has_include__   = cpp_lookup (pfile, DSC("__has_include__"));
-  s->n__has_include_next__ = cpp_lookup (pfile, DSC("__has_include_next__"));
+  /* __has_include{,_next} are inited in cpp_init_builtins.  */
 }
 
 /* Tear down the identifier hash table.  */
@@ -104,8 +103,8 @@ cpp_defined (cpp_reader *pfile, const unsigned char *str, int len)
 
   node = CPP_HASHNODE (ht_lookup (pfile->hash_table, str, len, HT_NO_INSERT));
 
-  /* If it's of type NT_MACRO, it cannot be poisoned.  */
-  return node && node->type == NT_MACRO;
+  /* If it's a macro, it cannot have been poisoned.  */
+  return node && cpp_macro_p (node);
 }
 
 /* We don't need a proxy since the hash table's identifier comes first