StringRef'icate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109217 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Mikhail Glushenkov 2010-07-23 04:19:39 +00:00
parent b2721e70df
commit 7d455eb7a4

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