1/* Declarations and definitons for stringpool.cc.
2 Copyright (C) 2013-2024 Free Software Foundation, Inc.
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify it under
7the terms of the GNU General Public License as published by the Free
8Software Foundation; either version 3, or (at your option) any later
9version.
10
11GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12WARRANTY; without even the implied warranty of MERCHANTABILITY or
13FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14for more details.
15
16You should have received a copy of the GNU General Public License
17along with GCC; see the file COPYING3. If not see
18<http://www.gnu.org/licenses/>. */
19
20#ifndef GCC_STRINGPOOL_H
21#define GCC_STRINGPOOL_H
22
23/* Return the (unique) IDENTIFIER_NODE node for a given name.
24 The name is supplied as a char *. */
25extern tree get_identifier (const char *);
26
27/* If an identifier with the name TEXT (a null-terminated string) has
28 previously been referred to, return that node; otherwise return
29 NULL_TREE. */
30extern tree maybe_get_identifier (const char *);
31
32/* Identical to get_identifier, except that the length is assumed
33 known. */
34extern tree get_identifier_with_length (const char *, size_t);
35
36#if GCC_VERSION >= 3000
37#define get_identifier(str) \
38 (__builtin_constant_p (str) \
39 ? get_identifier_with_length ((str), strlen (str)) \
40 : get_identifier (str))
41#endif
42
43#endif // GCC_STRINGPOOL_H
44

source code of gcc/stringpool.h