StringRef'icate.

llvm-svn: 109217
This commit is contained in:
Mikhail Glushenkov 2010-07-23 04:19:39 +00:00
parent dc0a05df55
commit 204fbaf5c2
1 changed files with 2 additions and 6 deletions

View File

@ -14,20 +14,16 @@
#ifndef LLVM_INCLUDE_COMPILER_DRIVER_ERROR_H
#define LLVM_INCLUDE_COMPILER_DRIVER_ERROR_H
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/raw_ostream.h"
#include <string>
namespace llvmc {
inline void PrintError(const char* Err) {
inline void PrintError(llvm::StringRef Err) {
extern const char* ProgramName;
llvm::errs() << ProgramName << ": " << Err << '\n';
}
inline void PrintError(const std::string& Err) {
PrintError(Err.c_str());
}
}
#endif // LLVM_INCLUDE_COMPILER_DRIVER_ERROR_H