[PATCH] D24047: [MC] Defer asm errors to post-statement failure

Nirav Dave via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 30 11:30:01 PDT 2016


niravd created this revision.
niravd added reviewers: rnk, majnemer.
niravd added a subscriber: llvm-commits.
Herald added subscribers: jyknight, aemerson.

Allow Errors to be deferred and emitted after at the top. This allows us
to improve error messages emitted parser subfunctions and to help avoid
duplicate/spurious error message.

As part of this:
  * Unify parser cleanup on error
  * Add Workaround for incorrect return values in ParseDirective
    instances
  * Tighten checks on error-signifying return values of functions
  * Fix associated errors in in-tree TargetParsers
  * Fix AArch64 test cases checking for spurious error messages.

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

https://reviews.llvm.org/D24047

Files:
  include/llvm/MC/MCParser/MCAsmLexer.h
  include/llvm/MC/MCParser/MCAsmParser.h
  lib/MC/MCParser/AsmParser.cpp
  lib/MC/MCParser/MCAsmLexer.cpp
  lib/MC/MCParser/MCAsmParser.cpp
  lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
  lib/Target/ARM/AsmParser/ARMAsmParser.cpp
  lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp
  lib/Target/Mips/AsmParser/MipsAsmParser.cpp
  lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
  lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
  lib/Target/X86/AsmParser/X86AsmParser.cpp
  test/MC/AArch64/armv8.1a-rdma.s
  test/MC/AArch64/inst-directive-diagnostic.s
  test/MC/AArch64/neon-diagnostics.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24047.69733.patch
Type: text/x-patch
Size: 111981 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160830/c1e356bf/attachment-0001.bin>


More information about the llvm-commits mailing list