2008-05-12 16:31:42 +00: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 03:42:55 +00:00
|
|
|
// Error handling.
|
2008-05-12 16:31:42 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2009-03-02 09:02:28 +00:00
|
|
|
#ifndef LLVM_INCLUDE_COMPILER_DRIVER_ERROR_H
|
|
|
|
#define LLVM_INCLUDE_COMPILER_DRIVER_ERROR_H
|
2008-05-12 16:31:42 +00:00
|
|
|
|
2010-07-23 04:19:39 +00:00
|
|
|
#include "llvm/ADT/StringRef.h"
|
2010-07-23 03:42:55 +00:00
|
|
|
#include "llvm/Support/raw_ostream.h"
|
2008-05-12 16:31:42 +00:00
|
|
|
|
2010-07-23 03:42:55 +00:00
|
|
|
namespace llvmc {
|
2008-05-12 16:31:42 +00:00
|
|
|
|
2010-07-23 04:19:39 +00:00
|
|
|
inline void PrintError(llvm::StringRef Err) {
|
2010-07-23 03:42:55 +00:00
|
|
|
extern const char* ProgramName;
|
|
|
|
llvm::errs() << ProgramName << ": " << Err << '\n';
|
|
|
|
}
|
2008-05-12 16:31:42 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2009-03-02 09:02:28 +00:00
|
|
|
#endif // LLVM_INCLUDE_COMPILER_DRIVER_ERROR_H
|