1193323Sed//===- SystemUtils.cpp - Utilities for low-level system tasks -------------===// 2193323Sed// 3193323Sed// The LLVM Compiler Infrastructure 4193323Sed// 5193323Sed// This file is distributed under the University of Illinois Open Source 6193323Sed// License. See LICENSE.TXT for details. 7193323Sed// 8193323Sed//===----------------------------------------------------------------------===// 9193323Sed// 10193323Sed// This file contains functions used to do a variety of low-level, often 11193323Sed// system-specific, tasks. 12193323Sed// 13193323Sed//===----------------------------------------------------------------------===// 14193323Sed 15193323Sed#include "llvm/Support/SystemUtils.h" 16218893Sdim#include "llvm/Support/Process.h" 17218893Sdim#include "llvm/Support/Program.h" 18198090Srdivacky#include "llvm/Support/raw_ostream.h" 19193323Sedusing namespace llvm; 20193323Sed 21198090Srdivackybool llvm::CheckBitcodeOutputToConsole(raw_ostream &stream_to_check, 22193323Sed bool print_warning) { 23198090Srdivacky if (stream_to_check.is_displayed()) { 24193323Sed if (print_warning) { 25198090Srdivacky errs() << "WARNING: You're attempting to print out a bitcode file.\n" 26218893Sdim "This is inadvisable as it may cause display problems. If\n" 27218893Sdim "you REALLY want to taste LLVM bitcode first-hand, you\n" 28218893Sdim "can force output with the `-f' option.\n\n"; 29193323Sed } 30193323Sed return true; 31193323Sed } 32193323Sed return false; 33193323Sed} 34