SystemUtils.cpp 1.1 KB

123456789101112131415161718192021222324252627
  1. //===- SystemUtils.cpp - Utilities for low-level system tasks -------------===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // This file contains functions used to do a variety of low-level, often
  10. // system-specific, tasks.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #include "llvm/Support/SystemUtils.h"
  14. #include "llvm/Support/raw_ostream.h"
  15. using namespace llvm;
  16. bool llvm::CheckBitcodeOutputToConsole(raw_ostream &stream_to_check) {
  17. if (stream_to_check.is_displayed()) {
  18. errs() << "WARNING: You're attempting to print out a bitcode file.\n"
  19. "This is inadvisable as it may cause display problems. If\n"
  20. "you REALLY want to taste LLVM bitcode first-hand, you\n"
  21. "can force output with the `-f' option.\n\n";
  22. return true;
  23. }
  24. return false;
  25. }