Check whether MCInst operand isImm before calling getImm.
authorTim Northover <Tim.Northover@arm.com>
Wed, 9 Jan 2013 13:32:04 +0000 (13:32 +0000)
committerTim Northover <Tim.Northover@arm.com>
Wed, 9 Jan 2013 13:32:04 +0000 (13:32 +0000)
commit7bf2e1b9ef797fda5de53956a1d2aea900ce794f
tree73af6ba21aaa381c4ea46502724745eff786d976
parent2c8cf4b404e549482f593f62f9e27e0bab4a8b3f
Check whether MCInst operand isImm before calling getImm.

When processing possible aliases, TableGen assumes that if an operand *can* be
an immediate, then it always *will* be. This is incorrect for the AArch64
backend. This patch inserts a check in the generated code to make sure isImm is
true first.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171972 91177308-0d34-0410-b5e6-96231b3b80d8
utils/TableGen/AsmWriterEmitter.cpp