2008-05-12 18:31:42 +02:00
|
|
|
//===--- Error.h - The LLVM Compiler Driver ---------------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open
|
|
|
|
// Source License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2010-07-23 05:42:55 +02:00
|
|
|
// Error handling.
|
2008-05-12 18:31:42 +02:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2009-03-02 10:02:28 +01:00
|
|
|
#ifndef LLVM_INCLUDE_COMPILER_DRIVER_ERROR_H
|
|
|
|
#define LLVM_INCLUDE_COMPILER_DRIVER_ERROR_H
|
2008-05-12 18:31:42 +02:00
|
|
|
|
2010-07-23 06:19:39 +02:00
|
|
|
#include "llvm/ADT/StringRef.h"
|
2010-07-23 05:42:55 +02:00
|
|
|
#include "llvm/Support/raw_ostream.h"
|
2008-05-12 18:31:42 +02:00
|
|
|
|
2010-07-23 05:42:55 +02:00
|
|
|
namespace llvmc {
|
2008-05-12 18:31:42 +02:00
|
|
|
|
2010-07-23 06:19:39 +02:00
|
|
|
inline void PrintError(llvm::StringRef Err) {
|
2010-07-23 05:42:55 +02:00
|
|
|
extern const char* ProgramName;
|
|
|
|
llvm::errs() << ProgramName << ": " << Err << '\n';
|
|
|
|
}
|
2008-05-12 18:31:42 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2009-03-02 10:02:28 +01:00
|
|
|
#endif // LLVM_INCLUDE_COMPILER_DRIVER_ERROR_H
|