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