aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-objc-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-objc-common.c')
-rw-r--r--gcc/c-objc-common.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/c-objc-common.c b/gcc/c-objc-common.c
index 6b17ad4..f32bf6d 100644
--- a/gcc/c-objc-common.c
+++ b/gcc/c-objc-common.c
@@ -270,17 +270,15 @@ c_tree_printer (pretty_printer *pp, text_info *text)
break;
case 'T':
- if (TREE_CODE (t) == TYPE_DECL)
+ if (TYPE_P (t))
+ t = TYPE_NAME (t);
+ if (t && TREE_CODE (t) == TYPE_DECL)
{
if (DECL_NAME (t))
n = lang_hooks.decl_printable_name (t, 2);
}
- else
- {
- t = TYPE_NAME (t);
- if (t)
- n = IDENTIFIER_POINTER (t);
- }
+ else if (t)
+ n = IDENTIFIER_POINTER (t);
break;
case 'E':