diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2005-01-02 00:10:03 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2005-01-02 00:10:03 +0000 |
commit | 4e8dd447330216be193d6f9bb9fc8633917b891b (patch) | |
tree | 23041393fc2aa4417bb9e02ca804b23d06652af2 /llvm/lib/Support/SystemUtils.cpp | |
parent | 742af2f2eb1be40ef673d179f9df0005c8104d8b (diff) | |
download | bcm5719-llvm-4e8dd447330216be193d6f9bb9fc8633917b891b.tar.gz bcm5719-llvm-4e8dd447330216be193d6f9bb9fc8633917b891b.zip |
Make printing a warning message optional in CheckBytecodeOutputToConsole.
llvm-svn: 19240
Diffstat (limited to 'llvm/lib/Support/SystemUtils.cpp')
-rw-r--r-- | llvm/lib/Support/SystemUtils.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/llvm/lib/Support/SystemUtils.cpp b/llvm/lib/Support/SystemUtils.cpp index dfb87755f7b..764f6be4eb2 100644 --- a/llvm/lib/Support/SystemUtils.cpp +++ b/llvm/lib/Support/SystemUtils.cpp @@ -19,12 +19,15 @@ using namespace llvm; -bool llvm::CheckBytecodeOutputToConsole(std::ostream* stream_to_check) { +bool llvm::CheckBytecodeOutputToConsole(std::ostream* stream_to_check, + bool print_warning) { if (stream_to_check == &std::cout && sys::Process::StandardOutIsDisplayed()) { - std::cerr << "WARNING: You're attempting to print out a bytecode file.\n"; - std::cerr << "This is inadvisable as it may cause display problems. If\n"; - std::cerr << "you REALLY want to taste LLVM bytecode first-hand, you can\n"; - std::cerr << "force output with the `-f' option.\n\n"; + if (print_warning) { + std::cerr << "WARNING: You're attempting to print out a bytecode file.\n"; + std::cerr << "This is inadvisable as it may cause display problems. If\n"; + std::cerr << "you REALLY want to taste LLVM bytecode first-hand, you\n"; + std::cerr << "can force output with the `-f' option.\n\n"; + } return true; } return false; |