stringpool.c (get_identifier_with_length): New function.
authorAlexandre Petit-Bianco <apbianco@redhat.com>
Fri, 21 Sep 2001 15:58:35 +0000 (08:58 -0700)
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>
Fri, 21 Sep 2001 15:58:35 +0000 (08:58 -0700)
2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>

* stringpool.c (get_identifier_with_length): New function.
* tree.h (get_identifier_with_length): New prototype.

( http://gcc.gnu.org/ml/gcc-patches/2001-09/msg00779.html )

From-SVN: r45731

gcc/ChangeLog
gcc/stringpool.c
gcc/tree.h

index 3c90282..c1548ac 100644 (file)
@@ -396,6 +396,11 @@ Thu Sep 20 12:19:36 CEST 2001  Jan Hubicka  <jh@suse.cz>
        (i386_simplify_dwarf_addr): Strip down the 64bit PIC references.
        * i386.h (CASE_VECTOR_MODE): Set to SImode for 64bit PIC compilation.
 
+2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
+
+       * stringpool.c (get_identifier_with_length): New function.
+       * tree.h (get_identifier_with_length): New prototype.
+
 2001-09-19  Alan Modra  <amodra@bigpond.net.au>
            David Edelsohn  <edelsohn@gnu.org>
 
index 32bf7b5..c28156c 100644 (file)
@@ -109,6 +109,22 @@ get_identifier (text)
   return HT_IDENT_TO_GCC_IDENT (ht_node);
 }
 
+/* Identical to get_identifier, except that the length is assumed
+   known.  */
+   
+tree
+get_identifier_with_length (text, length)
+     const char *text;
+     unsigned int length;
+{
+  hashnode ht_node = ht_lookup (ident_hash,
+                               (const unsigned char *) text,
+                               length, HT_ALLOC);
+
+  /* ht_node can't be NULL here.  */
+  return HT_IDENT_TO_GCC_IDENT (ht_node);
+}
+
 /* If an identifier with the name TEXT (a null-terminated string) has
    previously been referred to, return that node; otherwise return
    NULL_TREE.  */
index aee8434..fe94fa6 100644 (file)
@@ -1990,6 +1990,11 @@ extern tree make_tree_vec                PARAMS ((int));
 
 extern tree get_identifier             PARAMS ((const char *));
 
+/* Identical to get_identifier, except that the length is assumed
+   known.  */
+
+extern tree get_identifier_with_length  PARAMS ((const char *, unsigned int));
+
 /* If an identifier with the name TEXT (a null-terminated string) has
    previously been referred to, return that node; otherwise return
    NULL_TREE.  */