From 8983846e6934fc52b9f2894fc95e68cbd1f56187 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 27 May 2010 20:47:38 +0000 Subject: [PATCH] Make ParseIRFile and getLazyIRFileModule incoporate the underlying error message string into their own error message string, so that the information isn't lost. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104887 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/IRReader.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/llvm/Support/IRReader.h b/include/llvm/Support/IRReader.h index 0dfc302e242..fe47c057558 100644 --- a/include/llvm/Support/IRReader.h +++ b/include/llvm/Support/IRReader.h @@ -60,7 +60,8 @@ namespace llvm { 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 @@ namespace llvm { 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; }