summaryrefslogtreecommitdiff
path: root/gcc/cp/xref.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/xref.c')
-rw-r--r--gcc/cp/xref.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/xref.c b/gcc/cp/xref.c
index ff4817e55df..9a1fd976202 100644
--- a/gcc/cp/xref.c
+++ b/gcc/cp/xref.c
@@ -541,9 +541,9 @@ static const char *
classname (cls)
tree cls;
{
- if (cls && TREE_CODE_CLASS (TREE_CODE (cls)) == 't')
+ if (cls && TYPE_P (cls))
cls = TYPE_NAME (cls);
- if (cls && TREE_CODE_CLASS (TREE_CODE (cls)) == 'd')
+ if (cls && DECL_P (cls))
cls = DECL_NAME (cls);
if (cls && TREE_CODE (cls) == IDENTIFIER_NODE)
return IDENTIFIER_POINTER (cls);