2
0

SystemUtils.cpp 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. //===- SystemUtils.cpp - Utilities for low-level system tasks -------------===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. //
  10. // This file contains functions used to do a variety of low-level, often
  11. // system-specific, tasks.
  12. //
  13. //===----------------------------------------------------------------------===//
  14. #include "llvm/Support/SystemUtils.h"
  15. #include "llvm/Support/raw_ostream.h"
  16. using namespace llvm;
  17. bool llvm::CheckBitcodeOutputToConsole(raw_ostream &stream_to_check,
  18. bool print_warning) {
  19. if (stream_to_check.is_displayed()) {
  20. if (print_warning) {
  21. errs() << "WARNING: You're attempting to print out a bitcode file.\n"
  22. "This is inadvisable as it may cause display problems. If\n"
  23. "you REALLY want to taste LLVM bitcode first-hand, you\n"
  24. "can force output with the `-f' option.\n\n";
  25. }
  26. return true;
  27. }
  28. return false;
  29. }