summaryrefslogtreecommitdiff
path: root/lib/AsmParser/Parser.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-01-21 10:15:06 +0000
committerDan Gohman <gohman@apple.com>2010-01-21 10:15:06 +0000
commit82b5a30724e478ff7fbfe1483f6058657202939b (patch)
tree3970bacac864fb21babfbe0619e4230308a10eac /lib/AsmParser/Parser.cpp
parent5e5442c98bbfaa93e74c3f1a7d104545e91ba00d (diff)
downloadllvm-82b5a30724e478ff7fbfe1483f6058657202939b.tar.gz
llvm-82b5a30724e478ff7fbfe1483f6058657202939b.tar.bz2
llvm-82b5a30724e478ff7fbfe1483f6058657202939b.tar.xz
Make the parser include the lower level error message in its own error
message, to be more informative. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94072 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/Parser.cpp')
-rw-r--r--lib/AsmParser/Parser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/AsmParser/Parser.cpp b/lib/AsmParser/Parser.cpp
index 331a23323b..aac4027fc5 100644
--- a/lib/AsmParser/Parser.cpp
+++ b/lib/AsmParser/Parser.cpp
@@ -45,7 +45,8 @@ Module *llvm::ParseAssemblyFile(const std::string &Filename, SMDiagnostic &Err,
MemoryBuffer *F = MemoryBuffer::getFileOrSTDIN(Filename.c_str(), &ErrorStr);
if (F == 0) {
Err = SMDiagnostic("", -1, -1,
- "Could not open input file '" + Filename + "'", "");
+ "Could not open input file '" + Filename + "': " +
+ ErrorStr, "");
return 0;
}