Convert lvalue reference type check to general reference type check
[deliverable/binutils-gdb.git] / gdb / python / py-type.c
index c063d2c4438ad44dfec34b0c04dbd8f396353570..f0710061f748779d6b0150b4b9a89d1ef5a734bc 100644 (file)
@@ -460,8 +460,7 @@ typy_get_composite (struct type *type)
        }
       END_CATCH
 
-      if (TYPE_CODE (type) != TYPE_CODE_PTR
-         && TYPE_CODE (type) != TYPE_CODE_REF)
+      if (TYPE_CODE (type) != TYPE_CODE_PTR && !TYPE_IS_REFERENCE (type))
        break;
       type = TYPE_TARGET_TYPE (type);
     }
@@ -921,7 +920,7 @@ typy_template_argument (PyObject *self, PyObject *args)
   TRY
     {
       type = check_typedef (type);
-      if (TYPE_CODE (type) == TYPE_CODE_REF)
+      if (TYPE_IS_REFERENCE (type))
        type = check_typedef (TYPE_TARGET_TYPE (type));
     }
   CATCH (except, RETURN_MASK_ALL)
This page took 0.025191 seconds and 4 git commands to generate.