[PATCH] D14716: [Assembler] Allow non-fatal errors after parsing
Oliver Stannard via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 16 11:02:12 PST 2015
olista01 created this revision.
olista01 added a reviewer: rengolin.
olista01 added a subscriber: llvm-commits.
olista01 set the repository for this revision to rL LLVM.
Herald added a subscriber: dsanders.
This adds reportError to MCContext, which can be used as an alternative to reportFatalError when the assembler wants to try to continue processing the rest of the file after the error is reported, so that all of the errors ina file can be reported. It records the fact that an error was encountered, so we can avoid emitting an object file if any errors occurred.
This patch doesn't add any uses of this function (a later patch will convert most uses of reportFatalError to use it), but there is a small functional change: we use the SourceManager to print the error message, even if we have a null SMLoc. This means that we get a SourceManager-style message, with the file and line information shown as <unknown>, rather than the "LLVM ERROR" style used by report_fatal_error.
Repository:
rL LLVM
http://reviews.llvm.org/D14716
Files:
include/llvm/MC/MCContext.h
lib/MC/MCContext.cpp
lib/MC/MCParser/AsmParser.cpp
test/MC/Mips/micromips-diagnostic-fixup.s
test/MC/Mips/mips-diagnostic-fixup.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14716.40313.patch
Type: text/x-patch
Size: 4191 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151116/802bf85d/attachment.bin>
More information about the llvm-commits
mailing list