Skip to content

Commit caf0ab6

Browse files
author
Dan Gohman
committed
Make ParseIRFile and getLazyIRFileModule incoporate the underlying
error message string into their own error message string, so that the information isn't lost. llvm-svn: 104887
1 parent d877f2a commit caf0ab6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/include/llvm/Support/IRReader.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ namespace llvm {
6060
MemoryBuffer *F = MemoryBuffer::getFileOrSTDIN(Filename.c_str(), &ErrMsg);
6161
if (F == 0) {
6262
Err = SMDiagnostic(Filename,
63-
"Could not open input file '" + Filename + "'");
63+
"Could not open input file "
64+
"'" + Filename + "': " + ErrMsg);
6465
return 0;
6566
}
6667

@@ -98,7 +99,8 @@ namespace llvm {
9899
MemoryBuffer *F = MemoryBuffer::getFileOrSTDIN(Filename.c_str(), &ErrMsg);
99100
if (F == 0) {
100101
Err = SMDiagnostic(Filename,
101-
"Could not open input file '" + Filename + "'");
102+
"Could not open input file "
103+
"'" + Filename + "': " + ErrMsg);
102104
return 0;
103105
}
104106

0 commit comments

Comments
 (0)