From 7d455eb7a4de7d92b75c1a6275f5a3a0a7b65527 Mon Sep 17 00:00:00 2001 From: Mikhail Glushenkov Date: Fri, 23 Jul 2010 04:19:39 +0000 Subject: [PATCH] StringRef'icate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109217 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CompilerDriver/Error.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/include/llvm/CompilerDriver/Error.h b/include/llvm/CompilerDriver/Error.h index 02339296162..013094e5dd7 100644 --- a/include/llvm/CompilerDriver/Error.h +++ b/include/llvm/CompilerDriver/Error.h @@ -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 - 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 -- 2.34.1