summaryrefslogtreecommitdiffstats
path: root/libcxx/src
diff options
context:
space:
mode:
authorEd Schouten <ed@80386.nl>2015-03-10 07:57:43 +0000
committerEd Schouten <ed@80386.nl>2015-03-10 07:57:43 +0000
commitc19393c758e0e7d24fa39ef00c8a6a7beeb731ad (patch)
tree5f5908816688a34e8e7f4414eb9b795f3b19040f /libcxx/src
parent1bdbf48fff573653ba8ca612359af5af777e1fc4 (diff)
downloadbcm5719-llvm-c19393c758e0e7d24fa39ef00c8a6a7beeb731ad.tar.gz
bcm5719-llvm-c19393c758e0e7d24fa39ef00c8a6a7beeb731ad.zip
Print log/error messages on stderr, not stdout
There are a couple of places where libc++ prints log/error messages to stdout on its own. This may of course interfere with the output generated with applications. Log/error messages should be directed to stderr instead. Differential Revision: http://reviews.llvm.org/D8135 Reviewed by: marshall llvm-svn: 231767
Diffstat (limited to 'libcxx/src')
-rw-r--r--libcxx/src/exception.cpp16
-rw-r--r--libcxx/src/string.cpp2
2 files changed, 9 insertions, 9 deletions
diff --git a/libcxx/src/exception.cpp b/libcxx/src/exception.cpp
index b5c46c0805e..07983cea4e2 100644
--- a/libcxx/src/exception.cpp
+++ b/libcxx/src/exception.cpp
@@ -90,14 +90,14 @@ terminate() _NOEXCEPT
#endif // _LIBCPP_NO_EXCEPTIONS
(*get_terminate())();
// handler should not return
- printf("terminate_handler unexpectedly returned\n");
+ fprintf(stderr, "terminate_handler unexpectedly returned\n");
::abort();
#ifndef _LIBCPP_NO_EXCEPTIONS
}
catch (...)
{
// handler should not throw exception
- printf("terminate_handler unexpectedly threw an exception\n");
+ fprintf(stderr, "terminate_handler unexpectedly threw an exception\n");
::abort();
}
#endif // _LIBCPP_NO_EXCEPTIONS
@@ -117,7 +117,7 @@ bool uncaught_exception() _NOEXCEPT
# else
# warning uncaught_exception not yet implemented
# endif
- printf("uncaught_exception not yet implemented\n");
+ fprintf(stderr, "uncaught_exception not yet implemented\n");
::abort();
#endif // __APPLE__
}
@@ -190,7 +190,7 @@ exception_ptr::~exception_ptr() _NOEXCEPT
# else
# warning exception_ptr not yet implemented
# endif
- printf("exception_ptr not yet implemented\n");
+ fprintf(stderr, "exception_ptr not yet implemented\n");
::abort();
#endif
}
@@ -209,7 +209,7 @@ exception_ptr::exception_ptr(const exception_ptr& other) _NOEXCEPT
# else
# warning exception_ptr not yet implemented
# endif
- printf("exception_ptr not yet implemented\n");
+ fprintf(stderr, "exception_ptr not yet implemented\n");
::abort();
#endif
}
@@ -234,7 +234,7 @@ exception_ptr& exception_ptr::operator=(const exception_ptr& other) _NOEXCEPT
# else
# warning exception_ptr not yet implemented
# endif
- printf("exception_ptr not yet implemented\n");
+ fprintf(stderr, "exception_ptr not yet implemented\n");
::abort();
#endif
}
@@ -278,7 +278,7 @@ exception_ptr current_exception() _NOEXCEPT
# else
# warning exception_ptr not yet implemented
# endif
- printf("exception_ptr not yet implemented\n");
+ fprintf(stderr, "exception_ptr not yet implemented\n");
::abort();
#endif
}
@@ -300,7 +300,7 @@ void rethrow_exception(exception_ptr p)
# else
# warning exception_ptr not yet implemented
# endif
- printf("exception_ptr not yet implemented\n");
+ fprintf(stderr, "exception_ptr not yet implemented\n");
::abort();
#endif
}
diff --git a/libcxx/src/string.cpp b/libcxx/src/string.cpp
index febc5320997..d3f29df639f 100644
--- a/libcxx/src/string.cpp
+++ b/libcxx/src/string.cpp
@@ -39,7 +39,7 @@ void throw_helper( const string& msg )
#ifndef _LIBCPP_NO_EXCEPTIONS
throw T( msg );
#else
- printf("%s\n", msg.c_str());
+ fprintf(stderr, "%s\n", msg.c_str());
abort();
#endif
}
OpenPOWER on IntegriCloud