[X86] Use addAliasForDirective to support the .word directive (reland)
authorAlex Bradbury <asb@lowrisc.org>
Mon, 2 Jul 2018 13:49:52 +0000 (13:49 +0000)
committerAlex Bradbury <asb@lowrisc.org>
Mon, 2 Jul 2018 13:49:52 +0000 (13:49 +0000)
commitc48908781d540d5407245520fb4fe6e6a2f69ef8
tree76b675b3a6b39ef46c5f16a4627eff27e29d2695
parentc000e4dcb5c76a9e44f070a9e1742baab723ba97
[X86] Use addAliasForDirective to support the .word directive (reland)

The X86 asm parser currently has custom parsing logic for .word. Rather than
use this custom logic, we can just use addAliasForDirective to enable the
reuse of AsmParser::parseDirectiveValue.

See also similar changes to Sparc (rL333078), AArch64 (rL333077), and Hexagon
(rL332607) backends.

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

This is a fixed reland of rL336100. This should have been caught in
pre-commit testing so apologies for the noise.

llvm-svn: 336104
llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp