summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-01 23:56:57 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-01 23:56:57 +0000
commit34cfe31817a73fb491df60834182d41b42096aa8 (patch)
tree1a1e75bfd87d79783f8ddaff220add6963f3c3ea /gcc/cp
parent485dedbc22da55e181409609709313cff688d4e4 (diff)
downloadgcc-34cfe31817a73fb491df60834182d41b42096aa8.tar.gz
* cp-tree.h (DECL_PRETTY_FUNCTION_P): Just look at the name.
* decl.c (cp_make_fname_decl): Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191945 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/cp-tree.h4
-rw-r--r--gcc/cp/decl.c1
3 files changed, 7 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 6e3af003f33..9954928199b 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index f4370224dd3..cee85903f8c 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -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. */
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 078b1486615..d4c78e15bc1 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -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;