From 40d74620519e1157a2008dbc06821dfda8b295da Mon Sep 17 00:00:00 2001 From: CohenArthur Date: Tue, 1 Jun 2021 18:50:51 +0200 Subject: debug: Always print compiler debug info on stderr --- gcc/rust/rust-session-manager.cc | 2 +- gcc/rust/typecheck/rust-tyty.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc index 6ed556a..2c4399e 100644 --- a/gcc/rust/rust-session-manager.cc +++ b/gcc/rust/rust-session-manager.cc @@ -456,7 +456,7 @@ Session::parse_files (int num_files, const char **files) for (int i = 0; i < num_files; i++) { - printf ("Attempting to parse file: %s\n", files[i]); + fprintf (stderr, "Attempting to parse file: %s\n", files[i]); parse_file (files[i]); } /* TODO: should semantic analysis be dealed with here? or per file? for now, diff --git a/gcc/rust/typecheck/rust-tyty.h b/gcc/rust/typecheck/rust-tyty.h index 5acc9e7..285ed1c 100644 --- a/gcc/rust/typecheck/rust-tyty.h +++ b/gcc/rust/typecheck/rust-tyty.h @@ -142,8 +142,8 @@ public: void debug () const { - printf ("[%p] %s\n", static_cast (this), - debug_str ().c_str ()); + fprintf (stderr, "[%p] %s\n", static_cast (this), + debug_str ().c_str ()); } protected: @@ -319,7 +319,7 @@ public: StructFieldType *clone () const; - void debug () const { printf ("%s\n", as_string ().c_str ()); } + void debug () const { fprintf (stderr, "%s\n", as_string ().c_str ()); } private: HirId ref; -- cgit v1.1