1 //===--- Error.h - The LLVM Compiler Driver ---------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open
6 // Source License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 //  Error handling.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_INCLUDE_COMPILER_DRIVER_ERROR_H
15 #define LLVM_INCLUDE_COMPILER_DRIVER_ERROR_H
16 
17 #include "llvm/ADT/StringRef.h"
18 #include "llvm/Support/raw_ostream.h"
19 
20 namespace llvmc {
21 
PrintError(llvm::StringRef Err)22   inline void PrintError(llvm::StringRef Err) {
23     extern const char* ProgramName;
24     llvm::errs() << ProgramName << ": " << Err << '\n';
25   }
26 
27 }
28 
29 #endif // LLVM_INCLUDE_COMPILER_DRIVER_ERROR_H
30