aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCohenArthur <arthur.cohen@epita.fr>2021-06-01 18:50:51 +0200
committerCohenArthur <arthur.cohen@epita.fr>2021-06-01 18:58:17 +0200
commit40d74620519e1157a2008dbc06821dfda8b295da (patch)
tree5465063bf416877a13277703e1c572a54b90115a
parent4b13e27087a4c68824c281b2f980a7561dc39407 (diff)
downloadgcc-40d74620519e1157a2008dbc06821dfda8b295da.zip
gcc-40d74620519e1157a2008dbc06821dfda8b295da.tar.gz
gcc-40d74620519e1157a2008dbc06821dfda8b295da.tar.bz2
debug: Always print compiler debug info on stderr
-rw-r--r--gcc/rust/rust-session-manager.cc2
-rw-r--r--gcc/rust/typecheck/rust-tyty.h6
2 files changed, 4 insertions, 4 deletions
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<const void *> (this),
- debug_str ().c_str ());
+ fprintf (stderr, "[%p] %s\n", static_cast<const void *> (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;