]> granicus.if.org Git - llvm/commit
[ARM, Asm] Change grammar of immediate operand diagnostics
authorOliver Stannard <oliver.stannard@arm.com>
Wed, 4 Oct 2017 09:18:07 +0000 (09:18 +0000)
committerOliver Stannard <oliver.stannard@arm.com>
Wed, 4 Oct 2017 09:18:07 +0000 (09:18 +0000)
commit7426522d8b7fac42a8c5197c6a29792612c49cc4
tree2da2cfa26560513eed2ab83514000467bf9d68e2
parent930c4c0ea15c5bdf8a3d6d10d43ff00ece175f7c
[ARM, Asm] Change grammar of immediate operand diagnostics

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.

Differential revision: https://reviews.llvm.org/D36689

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314887 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
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