This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Improve pretty printing of obj type ref.

the type of class whose method is called used to be determinable (in wrong way)
by looking up type of OBJ_TYPE_REF_OBJECT parameter.  Now we determine it from
the method type of the call and this is not printed anywhere.
This adds a "cast" of the OBj_TYPE_REF_OBJECT so i can see it easily.

Bootstrapped/regtested x86_64-linux, OK?


	* tree-pretty-print.c (dump_generic_node): Print class type of OBJ_TYPE_REF.
Index: tree-pretty-print.c
--- tree-pretty-print.c	(revision 202838)
+++ tree-pretty-print.c	(working copy)
@@ -2040,6 +2040,12 @@ dump_generic_node (pretty_printer *buffe
       pp_string (buffer, "OBJ_TYPE_REF(");
       dump_generic_node (buffer, OBJ_TYPE_REF_EXPR (node), spc, flags, false);
       pp_semicolon (buffer);
+      if (virtual_method_call_p (node))
+	{
+	  pp_string (buffer, "(");
+	  dump_generic_node (buffer, obj_type_ref_class (node), spc, flags, false);
+	  pp_string (buffer, ")");
+	}
       dump_generic_node (buffer, OBJ_TYPE_REF_OBJECT (node), spc, flags, false);
       pp_arrow (buffer);
       dump_generic_node (buffer, OBJ_TYPE_REF_TOKEN (node), spc, flags, false);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]