10b57cec5SDimitry Andric //===- SystemUtils.cpp - Utilities for low-level system tasks -------------===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric // 90b57cec5SDimitry Andric // This file contains functions used to do a variety of low-level, often 100b57cec5SDimitry Andric // system-specific, tasks. 110b57cec5SDimitry Andric // 120b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 130b57cec5SDimitry Andric 140b57cec5SDimitry Andric #include "llvm/Support/SystemUtils.h" 150b57cec5SDimitry Andric #include "llvm/Support/raw_ostream.h" 160b57cec5SDimitry Andric using namespace llvm; 170b57cec5SDimitry Andric CheckBitcodeOutputToConsole(raw_ostream & stream_to_check)18*5ffd83dbSDimitry Andricbool llvm::CheckBitcodeOutputToConsole(raw_ostream &stream_to_check) { 190b57cec5SDimitry Andric if (stream_to_check.is_displayed()) { 200b57cec5SDimitry Andric errs() << "WARNING: You're attempting to print out a bitcode file.\n" 210b57cec5SDimitry Andric "This is inadvisable as it may cause display problems. If\n" 220b57cec5SDimitry Andric "you REALLY want to taste LLVM bitcode first-hand, you\n" 230b57cec5SDimitry Andric "can force output with the `-f' option.\n\n"; 240b57cec5SDimitry Andric return true; 250b57cec5SDimitry Andric } 260b57cec5SDimitry Andric return false; 270b57cec5SDimitry Andric } 28