]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
cp-tree.h (DECL_PRETTY_FUNCTION_P): Just look at the name.
authorJason Merrill <jason@redhat.com>
Mon, 1 Oct 2012 23:56:57 +0000 (19:56 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 1 Oct 2012 23:56:57 +0000 (19:56 -0400)
* cp-tree.h (DECL_PRETTY_FUNCTION_P): Just look at the name.
* decl.c (cp_make_fname_decl): Adjust.

From-SVN: r191945

gcc/c-family/c-common.h
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c

index 9298e3d81707a47098b3e7eebef14ecef6fe3f39..cefe92d9ee616f05af24e79dda262401a66ef91c 100644 (file)
@@ -45,7 +45,6 @@ never after.
 
 /* Usage of TREE_LANG_FLAG_?:
    0: IDENTIFIER_MARKED (used by search routines).
-      DECL_PRETTY_FUNCTION_P (in VAR_DECL)
       C_MAYBE_CONST_EXPR_INT_OPERANDS (in C_MAYBE_CONST_EXPR, for C)
    1: C_DECLARED_LABEL_FLAG (in LABEL_DECL)
       STATEMENT_LIST_STMT_EXPR (in STATEMENT_LIST)
index 6e3af003f3399506ba1cd731c21eb8b25f59bae1..9954928199b05bae106d1917b8965f1de0341e11 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-01  Jason Merrill  <jason@redhat.com>
+
+       * cp-tree.h (DECL_PRETTY_FUNCTION_P): Just look at the name.
+       * decl.c (cp_make_fname_decl): Adjust.
+
 2012-09-30  Sharad Singhai  <singhai@google.com>
 
        * decl2.c (cp_write_global_declarations): Use a different method
index f4370224dd32b3f3c6a8e6cfeef342c1620dd8e9..cee85903f8c079a2e88fc5726638af840e3128f3 100644 (file)
@@ -56,7 +56,6 @@ c-common.h, not after.
       AGGR_INIT_VIA_CTOR_P (in AGGR_INIT_EXPR)
       PTRMEM_OK_P (in ADDR_EXPR, OFFSET_REF, SCOPE_REF)
       PAREN_STRING_LITERAL (in STRING_CST)
-      DECL_PRETTY_FUNCTION_P (in VAR_DECL)
       KOENIG_LOOKUP_P (in CALL_EXPR)
       STATEMENT_LIST_NO_SCOPE (in STATEMENT_LIST).
       EXPR_STMT_STMT_EXPR_RESULT (in EXPR_STMT)
@@ -2410,7 +2409,8 @@ struct GTY((variable_size)) lang_decl {
 /* Nonzero if this DECL is the __PRETTY_FUNCTION__ variable in a
    template function.  */
 #define DECL_PRETTY_FUNCTION_P(NODE) \
-  (TREE_LANG_FLAG_0 (VAR_DECL_CHECK (NODE)))
+  (DECL_NAME (NODE) \
+   && !strcmp (IDENTIFIER_POINTER (DECL_NAME (NODE)), "__PRETTY_FUNCTION__"))
 
 /* The _TYPE context in which this _DECL appears.  This field holds the
    class where a virtual function instance is actually defined.  */
index 078b1486615e519ebe2bbbd27006c3b7bad5dc0a..d4c78e15bc100268e405cf7f5ad173b80b926f12 100644 (file)
@@ -3829,7 +3829,6 @@ cp_make_fname_decl (location_t loc, tree id, int type_dep)
 
   /* As we're using pushdecl_with_scope, we must set the context.  */
   DECL_CONTEXT (decl) = current_function_decl;
-  DECL_PRETTY_FUNCTION_P (decl) = type_dep;
 
   TREE_STATIC (decl) = 1;
   TREE_READONLY (decl) = 1;