LLVM API Documentation
00001 //===- SystemUtils.cpp - Utilities for low-level system tasks -------------===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file contains functions used to do a variety of low-level, often 00011 // system-specific, tasks. 00012 // 00013 //===----------------------------------------------------------------------===// 00014 00015 #include "llvm/Support/SystemUtils.h" 00016 #include "llvm/Support/Process.h" 00017 #include "llvm/Support/Program.h" 00018 #include "llvm/Support/raw_ostream.h" 00019 using namespace llvm; 00020 00021 bool llvm::CheckBitcodeOutputToConsole(raw_ostream &stream_to_check, 00022 bool print_warning) { 00023 if (stream_to_check.is_displayed()) { 00024 if (print_warning) { 00025 errs() << "WARNING: You're attempting to print out a bitcode file.\n" 00026 "This is inadvisable as it may cause display problems. If\n" 00027 "you REALLY want to taste LLVM bitcode first-hand, you\n" 00028 "can force output with the `-f' option.\n\n"; 00029 } 00030 return true; 00031 } 00032 return false; 00033 }