(indent): Move to file level; was static in print_rtx.
authorRichard Kenner <kenner@gcc.gnu.org>
Sat, 2 Aug 1997 21:29:08 +0000 (17:29 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Sat, 2 Aug 1997 21:29:08 +0000 (17:29 -0400)
(print_inline_rtx): New function.

From-SVN: r14633

gcc/print-rtl.c

index 7c268197a7423819ba9398dde00a981f8219153a..1073288aff64fe1c027dcb14ab81a0eca4999d2f 100644 (file)
@@ -1,5 +1,5 @@
 /* Print RTL for GNU C Compiler.
-   Copyright (C) 1987, 1988, 1992 Free Software Foundation, Inc.
+   Copyright (C) 1987, 1988, 1992, 1997 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -47,6 +47,8 @@ char spaces[] = "
 
 static int sawclose = 0;
 
+static int indent;
+
 /* Names for patterns.  Non-zero only when linked with insn-output.c.  */
 
 extern char **insn_name_ptr;
@@ -57,7 +59,6 @@ static void
 print_rtx (in_rtx)
      register rtx in_rtx;
 {
-  static int indent;
   register int i, j;
   register char *format_ptr;
   register int is_insn;
@@ -223,6 +224,20 @@ print_rtx (in_rtx)
   sawclose = 1;
 }
 
+/* Print an rtx on the current line of FILE.  Initially indent IND
+   characters.  */
+
+void
+print_inline_rtx (outf, x, ind)
+     FILE *outf;
+     rtx x;
+{
+  sawclose = 0;
+  indent = ind;
+  outfile = outf;
+  print_rtx (x);
+}
+
 /* Call this function from the debugger to see what X looks like.  */
 
 void
@@ -274,7 +289,7 @@ debug_rtx_list (x, n)
    The found insn is returned to enable further debugging analysis.  */
 
 rtx
-debug_rtx_find(x, uid)
+debug_rtx_find (x, uid)
      rtx x;
      int uid;
 {