llvm-project/llvm/lib/MC/MCParser
Nirav Dave 2364748a49 Defer asm errors to post-statement failure
Recommitting after fixing AsmParser initialization and X86 inline asm
error cleanup.

Allow errors to be deferred and emitted as part of clean up to simplify
and shorten Assembly parser code. This will allow error messages to be
emitted in helper functions and be modified by the caller which has
better context.

As part of this many minor cleanups to the Parser:

* Unify parser cleanup on error
* Add Workaround for incorrect return values in ParseDirective instances
* Tighten checks on error-signifying return values for parser functions
  and fix in-tree TargetParsers to be more consistent with the changes.
* Fix AArch64 test cases checking for spurious error messages that are
  now fixed.

These changes should be backwards compatible with current Target Parsers
so long as the error status are correctly returned in appropriate
functions.

Reviewers: rnk, majnemer

Subscribers: aemerson, jyknight, llvm-commits

Differential Revision: https://reviews.llvm.org/D24047

llvm-svn: 281762
2016-09-16 18:30:20 +00:00
..
AsmLexer.cpp (LLVM part) Implement MASM-flavor intel syntax behavior for inline MS asm block: 2016-09-02 23:15:29 +00:00
AsmParser.cpp Defer asm errors to post-statement failure 2016-09-16 18:30:20 +00:00
CMakeLists.txt Fix header path in CMake. NFC. 2015-06-19 20:49:02 +00:00
COFFAsmParser.cpp [MC] Handle discardable COFF sections in assembly 2016-09-14 22:41:50 +00:00
DarwinAsmParser.cpp [MC] Cleanup Error Handling in AsmParser 2016-07-18 15:24:03 +00:00
ELFAsmParser.cpp [MC] Cleanup Error Handling in AsmParser 2016-07-18 15:24:03 +00:00
LLVMBuild.txt
MCAsmLexer.cpp Defer asm errors to post-statement failure 2016-09-16 18:30:20 +00:00
MCAsmParser.cpp Defer asm errors to post-statement failure 2016-09-16 18:30:20 +00:00
MCAsmParserExtension.cpp
MCTargetAsmParser.cpp Move MCTargetAsmParser.h to llvm/MC/MCParser where it belongs. 2016-01-27 10:01:28 +00:00