diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-06 18:06:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-06 18:06:18 +0000 |
commit | 97c4cb8947a8616d92622ca4046fcaec7ec17463 (patch) | |
tree | cfccd77371de2e6c26e42ad114db18a5d9eed2f6 /llvm/lib/AsmParser | |
parent | 6d67213ebbaf30500ef563d954c3885e427818d9 (diff) | |
download | bcm5719-llvm-97c4cb8947a8616d92622ca4046fcaec7ec17463.tar.gz bcm5719-llvm-97c4cb8947a8616d92622ca4046fcaec7ec17463.zip |
enhance SMDiagnostic to also maintain a pointer to the SourceMgr.
Add a simplified constructor for clients that don't have locations
like "file not found" errors.
llvm-svn: 100538
Diffstat (limited to 'llvm/lib/AsmParser')
-rw-r--r-- | llvm/lib/AsmParser/Parser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/AsmParser/Parser.cpp b/llvm/lib/AsmParser/Parser.cpp index 7280cf479f2..e511cbe29c7 100644 --- a/llvm/lib/AsmParser/Parser.cpp +++ b/llvm/lib/AsmParser/Parser.cpp @@ -44,9 +44,9 @@ Module *llvm::ParseAssemblyFile(const std::string &Filename, SMDiagnostic &Err, std::string ErrorStr; MemoryBuffer *F = MemoryBuffer::getFileOrSTDIN(Filename.c_str(), &ErrorStr); if (F == 0) { - Err = SMDiagnostic(SMLoc(), "", -1, -1, + Err = SMDiagnostic(Filename, "Could not open input file '" + Filename + "': " + - ErrorStr, ""); + ErrorStr); return 0; } |