blob: 77deddb9ee1c23da97d160a49cb0b4a05a1dcb33 [file] [log] [blame]
Andrew Scull5e1ddfa2018-08-14 10:06:54 +01001//===- SystemUtils.h - Utilities to do low-level system stuff ---*- C++ -*-===//
2//
Andrew Walbran16937d02019-10-22 13:54:20 +01003// 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
Andrew Scull5e1ddfa2018-08-14 10:06:54 +01006//
7//===----------------------------------------------------------------------===//
8//
9// This file contains functions used to do a variety of low-level, often
10// system-specific, tasks.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_SUPPORT_SYSTEMUTILS_H
15#define LLVM_SUPPORT_SYSTEMUTILS_H
16
17namespace llvm {
18 class raw_ostream;
19
20/// Determine if the raw_ostream provided is connected to a terminal. If so,
21/// generate a warning message to errs() advising against display of bitcode
22/// and return true. Otherwise just return false.
Andrew Scullcdfcccc2018-10-05 20:58:37 +010023/// Check for output written to a console
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010024bool CheckBitcodeOutputToConsole(
25 raw_ostream &stream_to_check, ///< The stream to be checked
26 bool print_warning = true ///< Control whether warnings are printed
27);
28
29} // End llvm namespace
30
31#endif