[llvm-commits] [llvm] r104887 - /llvm/trunk/include/llvm/Support/IRReader.h

Dan Gohman gohman at apple.com
Thu May 27 13:47:38 PDT 2010


Author: djg
Date: Thu May 27 15:47:38 2010
New Revision: 104887

URL: http://llvm.org/viewvc/llvm-project?rev=104887&view=rev
Log:
Make ParseIRFile and getLazyIRFileModule incoporate the underlying
error message string into their own error message string, so that
the information isn't lost.

Modified:
    llvm/trunk/include/llvm/Support/IRReader.h

Modified: llvm/trunk/include/llvm/Support/IRReader.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/IRReader.h?rev=104887&r1=104886&r2=104887&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/IRReader.h (original)
+++ llvm/trunk/include/llvm/Support/IRReader.h Thu May 27 15:47:38 2010
@@ -60,7 +60,8 @@
     MemoryBuffer *F = MemoryBuffer::getFileOrSTDIN(Filename.c_str(), &ErrMsg);
     if (F == 0) {
       Err = SMDiagnostic(Filename, 
-                         "Could not open input file '" + Filename + "'");
+                         "Could not open input file "
+                         "'" + Filename + "': " + ErrMsg);
       return 0;
     }
 
@@ -98,7 +99,8 @@
     MemoryBuffer *F = MemoryBuffer::getFileOrSTDIN(Filename.c_str(), &ErrMsg);
     if (F == 0) {
       Err = SMDiagnostic(Filename, 
-                         "Could not open input file '" + Filename + "'");
+                         "Could not open input file "
+                         "'" + Filename + "': " + ErrMsg);
       return 0;
     }
 





More information about the llvm-commits mailing list