OSDN Git Service

Don't print the filename twice in file-not-found errors.
authorDan Gohman <gohman@apple.com>
Wed, 4 Aug 2010 01:13:48 +0000 (01:13 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 4 Aug 2010 01:13:48 +0000 (01:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110179 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/IRReader.h
lib/AsmParser/Parser.cpp

index 3da6e85..a44da52 100644 (file)
@@ -60,8 +60,7 @@ namespace llvm {
     MemoryBuffer *F = MemoryBuffer::getFileOrSTDIN(Filename.c_str(), &ErrMsg);
     if (F == 0) {
       Err = SMDiagnostic(Filename, 
-                         "Could not open input file "
-                         "'" + Filename + "': " + ErrMsg);
+                         "Could not open input file: " + ErrMsg);
       return 0;
     }
 
@@ -99,8 +98,7 @@ namespace llvm {
     MemoryBuffer *F = MemoryBuffer::getFileOrSTDIN(Filename.c_str(), &ErrMsg);
     if (F == 0) {
       Err = SMDiagnostic(Filename, 
-                         "Could not open input file "
-                         "'" + Filename + "': " + ErrMsg);
+                         "Could not open input file: " + ErrMsg);
       return 0;
     }
 
index e511cbe..e7cef9b 100644 (file)
@@ -45,8 +45,7 @@ Module *llvm::ParseAssemblyFile(const std::string &Filename, SMDiagnostic &Err,
   MemoryBuffer *F = MemoryBuffer::getFileOrSTDIN(Filename.c_str(), &ErrorStr);
   if (F == 0) {
     Err = SMDiagnostic(Filename,
-                       "Could not open input file '" + Filename + "': " +
-                       ErrorStr);
+                       "Could not open input file: " + ErrorStr);
     return 0;
   }