]> gcc.gnu.org Git - gcc.git/commitdiff
dwarf2out.c (is_subrange_type): Minor code rework.
authorJoel Brobecker <brobecker@gnat.com>
Mon, 22 Mar 2004 20:55:07 +0000 (20:55 +0000)
committerJoel Brobecker <brobecke@gcc.gnu.org>
Mon, 22 Mar 2004 20:55:07 +0000 (20:55 +0000)
        * dwarf2out.c (is_subrange_type): Minor code rework. No behavior
        change.

From-SVN: r79837

gcc/ChangeLog
gcc/dwarf2out.c

index 9e06227a2862575286493bc812271762deb8bb3f..4237524377759ff9b53199e56951fc83dcd16bb0 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-22  Joel Brobecker  <brobecker@gnat.com>
+
+       * dwarf2out.c (is_subrange_type): Minor code rework. No behavior
+       change.
+
 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
 
        PR c/14069
index b3dcda0c5c05831e7fe6a8b002338176809df8b5..ad2bf63aaec7ee7fbde51b8875fef13a269399af 100644 (file)
@@ -8000,15 +8000,19 @@ is_subrange_type (tree type)
 {
   tree subtype = TREE_TYPE (type);
 
-  if (TREE_CODE (type) == INTEGER_TYPE
-      && subtype != NULL_TREE)
-    {
-      if (TREE_CODE (subtype) == INTEGER_TYPE)
-        return true;
-      if (TREE_CODE (subtype) == ENUMERAL_TYPE)
-        return true;
-    }
-  return false;
+  /* Subrange types are identified by the fact that they are integer
+     types, and that they have a subtype which is either an integer type
+     or an enumeral type.  */
+
+  if (TREE_CODE (type) != INTEGER_TYPE
+      || subtype == NULL_TREE)
+    return false;
+
+  if (TREE_CODE (subtype) != INTEGER_TYPE
+      && TREE_CODE (subtype) != ENUMERAL_TYPE)
+    return false;
+
+  return true;
 }
 
 /*  Given a pointer to a tree node for a subrange type, return a pointer
This page took 0.080932 seconds and 5 git commands to generate.