[PATCH] D36689: [ARM, Asm] Change grammar of immediate operand diagnostics

Oliver Stannard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 14 09:07:10 PDT 2017


olista01 created this revision.
Herald added subscribers: kristof.beyls, javed.absar, aemerson.

Currently, our diagnostics for assembly operands are not consistent.
Some start with (for example) "immediate operand must be ...",
and some with "operand must be an immediate ...". I think the latter
form is preferable for a few reasons:

- It's unambiguous that it is referring to the expected type of operand, not the type the user provided. For example, the user could provide an register operand, and get a message taking about an operand is if it is already an immediate, just not in the accepted range.
- It allows us to have a consistent style once we add diagnostics for operands that could take two forms, for example a label or pc-relative memory operand.


Repository:
  rL LLVM

https://reviews.llvm.org/D36689

Files:
  lib/Target/ARM/ARMInstrInfo.td
  test/MC/ARM/basic-arm-instructions-v8.1a.s
  test/MC/ARM/diagnostics.s
  test/MC/ARM/invalid-hint-arm.s
  test/MC/ARM/invalid-hint-thumb.s
  test/MC/ARM/lsl-zero-errors.s
  test/MC/ARM/negative-immediates-thumb1-fail.s
  test/MC/ARM/t2-modified-immediate-fixup-error2.s
  test/MC/ARM/thumb-diagnostics.s
  test/MC/ARM/thumb2-diagnostics.s
  test/MC/ARM/udf-arm-diagnostics.s
  test/MC/ARM/udf-thumb-2-diagnostics.s
  test/MC/ARM/udf-thumb-diagnostics.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36689.110994.patch
Type: text/x-patch
Size: 19789 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170814/220041b7/attachment.bin>


More information about the llvm-commits mailing list