LLVM
16.0.0git
lib
Support
SystemUtils.cpp
Go to the documentation of this file.
1
//===- SystemUtils.cpp - Utilities for low-level system tasks -------------===//
2
//
3
// 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
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// This file contains functions used to do a variety of low-level, often
10
// system-specific, tasks.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#include "
llvm/Support/SystemUtils.h
"
15
#include "
llvm/Support/raw_ostream.h
"
16
using namespace
llvm
;
17
18
bool
llvm::CheckBitcodeOutputToConsole
(
raw_ostream
&stream_to_check) {
19
if
(stream_to_check.
is_displayed
()) {
20
errs
() <<
"WARNING: You're attempting to print out a bitcode file.\n"
21
"This is inadvisable as it may cause display problems. If\n"
22
"you REALLY want to taste LLVM bitcode first-hand, you\n"
23
"can force output with the `-f' option.\n\n"
;
24
return
true
;
25
}
26
return
false
;
27
}
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
llvm::raw_ostream::is_displayed
virtual bool is_displayed() const
This function determines if this stream is connected to a "tty" or "console" window.
Definition:
raw_ostream.h:320
llvm::errs
raw_fd_ostream & errs()
This returns a reference to a raw_ostream for standard error.
Definition:
raw_ostream.cpp:893
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition:
raw_ostream.h:52
SystemUtils.h
llvm::CheckBitcodeOutputToConsole
bool CheckBitcodeOutputToConsole(raw_ostream &stream_to_check)
Determine if the raw_ostream provided is connected to a terminal.
Definition:
SystemUtils.cpp:18
raw_ostream.h
Generated on Tue Aug 16 2022 19:14:46 for LLVM by
1.8.17