freebsd-dev/contrib/llvm/lib/Support/SystemUtils.cpp

32 lines
1.1 KiB
C++
Raw Normal View History

2009-06-02 17:52:33 +00:00
//===- 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"
2009-10-14 17:57:32 +00:00
#include "llvm/Support/raw_ostream.h"
2009-06-02 17:52:33 +00:00
using namespace llvm;
2009-10-14 17:57:32 +00:00
bool llvm::CheckBitcodeOutputToConsole(raw_ostream &stream_to_check,
2009-06-02 17:52:33 +00:00
bool print_warning) {
2009-10-14 17:57:32 +00:00
if (stream_to_check.is_displayed()) {
2009-06-02 17:52:33 +00:00
if (print_warning) {
2009-10-14 17:57:32 +00:00
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";
2009-06-02 17:52:33 +00:00
}
return true;
}
return false;
}