summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit9b85ae26b1b5a212603eb44bd5b04e7af0a34472 (patch)
tree180c90d5b27fa9da459fa491655bf8648861863a /llvm/lib/AsmParser/Parser.cpp
parent7c6759094aa496c62c7f1616e54f496ad98da096 (diff)
downloadbcm5719-llvm-9b85ae26b1b5a212603eb44bd5b04e7af0a34472.tar.gz
bcm5719-llvm-9b85ae26b1b5a212603eb44bd5b04e7af0a34472.zip
Make the parser include the lower level error message in its own error
message, to be more informative. llvm-svn: 94072
Diffstat (limited to 'llvm/lib/AsmParser/Parser.cpp')
-rw-r--r--llvm/lib/AsmParser/Parser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/Parser.cpp b/llvm/lib/AsmParser/Parser.cpp
index 331a23323b5..aac4027fc57 100644
--- a/llvm/lib/AsmParser/Parser.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud