From b5500b9ca0102f1ccaf32f0e77e96d0739aded9b Mon Sep 17 00:00:00 2001 From: pascal Date: Sat, 3 Sep 2016 22:46:54 +0000 Subject: Use the space freed up by sparc and zaurus to import LLVM. ok hackroom@ --- gnu/llvm/lib/Support/SystemUtils.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 gnu/llvm/lib/Support/SystemUtils.cpp (limited to 'gnu/llvm/lib/Support/SystemUtils.cpp') diff --git a/gnu/llvm/lib/Support/SystemUtils.cpp b/gnu/llvm/lib/Support/SystemUtils.cpp new file mode 100644 index 00000000000..7fa6ae3f619 --- /dev/null +++ b/gnu/llvm/lib/Support/SystemUtils.cpp @@ -0,0 +1,31 @@ +//===- SystemUtils.cpp - Utilities for low-level system tasks -------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file contains functions used to do a variety of low-level, often +// system-specific, tasks. +// +//===----------------------------------------------------------------------===// + +#include "llvm/Support/SystemUtils.h" +#include "llvm/Support/raw_ostream.h" +using namespace llvm; + +bool llvm::CheckBitcodeOutputToConsole(raw_ostream &stream_to_check, + bool print_warning) { + if (stream_to_check.is_displayed()) { + if (print_warning) { + errs() << "WARNING: You're attempting to print out a bitcode file.\n" + "This is inadvisable as it may cause display problems. If\n" + "you REALLY want to taste LLVM bitcode first-hand, you\n" + "can force output with the `-f' option.\n\n"; + } + return true; + } + return false; +} -- cgit v1.2.3-59-g8ed1b