+2005-11-03 Wu Zhou <woodzltc@cn.ibm.com>
+
+ Checked in by Elena Zannoni <ezannoni@redhat.com>
+
+ * dwarf2read.c (read_structure_type): Add IBM XL C++
+ specific code to set TYPE_VPTR_FIELDNO and TYPE_VPTR_BASETYPE
+ of a virtual class if a field named "__vfp" is found.
+
2005-11-03 Jim Blandy <jimb@redhat.com>
Checked in by Elena Zannoni <ezannoni@redhat.com>
TYPE_VPTR_FIELDNO (type) = TYPE_VPTR_FIELDNO (t);
}
}
+ else if (cu->producer
+ && strncmp (cu->producer,
+ "IBM(R) XL C/C++ Advanced Edition", 32) == 0)
+ {
+ /* The IBM XLC compiler does not provide direct indication
+ of the containing type, but the vtable pointer is
+ always named __vfp. */
+
+ int i;
+
+ for (i = TYPE_NFIELDS (type) - 1;
+ i >= TYPE_N_BASECLASSES (type);
+ --i)
+ {
+ if (strcmp (TYPE_FIELD_NAME (type, i), "__vfp") == 0)
+ {
+ TYPE_VPTR_FIELDNO (type) = i;
+ TYPE_VPTR_BASETYPE (type) = type;
+ break;
+ }
+ }
+ }
}
do_cleanups (back_to);