aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-utils.h
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2017-10-11 16:35:18 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2017-10-11 16:35:18 +0000
commita92f67261ace8c269ae588394bf77ac017bdad3b (patch)
tree3391663508708f07e1d69dd68f414f42a8bb0a94 /gcc/ipa-utils.h
parent4e7d02606ea8b0dac11887b1f759ea61d5394d86 (diff)
downloadgcc-a92f67261ace8c269ae588394bf77ac017bdad3b.zip
gcc-a92f67261ace8c269ae588394bf77ac017bdad3b.tar.gz
gcc-a92f67261ace8c269ae588394bf77ac017bdad3b.tar.bz2
[PATCH] DECL_ASSEMBLER_NAME and friends
https://gcc.gnu.org/ml/gcc-patches/2017-10/msg00582.html * tree.h (DECL_ASSEMBLER_NAME_SET_P): Don't check HAS_DECL_ASSEMBLER_NAME_P. * gimple-expr.c (gimple_decl_printable_name: Check HAS_DECL_ASSEMBLER_NAME_P too. * ipa-utils.h (type_in_anonymous_namespace_p): Check DECL_ASSEMBLER_NAME_SET_P of TYPE_NAME. (odr_type_p): No need to assert TYPE_NAME is a TYPE_DECL. * passes.c (rest_of_decl_compilation): Check HAS_DECL_ASSEMBLER_NAME_P too. * recog.c (verify_changes): Likewise. * tree-pretty-print.c (dump_decl_name): Likewise. * tree-ssa-structalias.c (alias_get_name): Likewise. Reimplement. c/ * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too. From-SVN: r253649
Diffstat (limited to 'gcc/ipa-utils.h')
-rw-r--r--gcc/ipa-utils.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/gcc/ipa-utils.h b/gcc/ipa-utils.h
index f061c84..2affbd6 100644
--- a/gcc/ipa-utils.h
+++ b/gcc/ipa-utils.h
@@ -217,11 +217,11 @@ type_in_anonymous_namespace_p (const_tree t)
{
/* C++ FE uses magic <anon> as assembler names of anonymous types.
verify that this match with type_in_anonymous_namespace_p. */
- gcc_checking_assert (!in_lto_p || !DECL_ASSEMBLER_NAME_SET_P (t)
- || !strcmp
- ("<anon>",
- IDENTIFIER_POINTER
- (DECL_ASSEMBLER_NAME (TYPE_NAME (t)))));
+ gcc_checking_assert (!in_lto_p
+ || !DECL_ASSEMBLER_NAME_SET_P (TYPE_NAME (t))
+ || !strcmp ("<anon>",
+ IDENTIFIER_POINTER
+ (DECL_ASSEMBLER_NAME (TYPE_NAME (t)))));
return true;
}
return false;
@@ -245,14 +245,13 @@ odr_type_p (const_tree t)
if (type_in_anonymous_namespace_p (t))
return true;
- if (TYPE_NAME (t) && TREE_CODE (TYPE_NAME (t)) == TYPE_DECL
- && DECL_ASSEMBLER_NAME_SET_P (TYPE_NAME (t)))
+ if (TYPE_NAME (t) && DECL_ASSEMBLER_NAME_SET_P (TYPE_NAME (t)))
{
/* C++ FE uses magic <anon> as assembler names of anonymous types.
verify that this match with type_in_anonymous_namespace_p. */
gcc_checking_assert (strcmp ("<anon>",
- IDENTIFIER_POINTER
- (DECL_ASSEMBLER_NAME (TYPE_NAME (t)))));
+ IDENTIFIER_POINTER
+ (DECL_ASSEMBLER_NAME (TYPE_NAME (t)))));
return true;
}
return false;