[MC][Target][XCOFF] Consolidate MCAsmInfo XCOFF defaults; NFC
authorHubert Tong <hubert.reinterpretcast@gmail.com>
Fri, 1 May 2020 00:44:04 +0000 (20:44 -0400)
committerHubert Tong <hubert.reinterpretcast@gmail.com>
Fri, 1 May 2020 00:48:30 +0000 (20:48 -0400)
commita3515ab8af8aa2db463def55ba6a477b24e64a54
tree2d9ea5e5eaacc4b0cdebb26a3f70df2e744620b1
parent5d806e254e81411698089761aa4b441882a86b07
[MC][Target][XCOFF] Consolidate MCAsmInfo XCOFF defaults; NFC

The setting of `MCAsmInfo` properties for XCOFF got split between
`MCAsmInfoXCOFF` and `PPCXCOFFMCAsmInfo`. Except for the properties that
are dependent on the target information being passed via the
constructor, the properties being set in `PPCXCOFFMCAsmInfo` had no
fundamental reason for being treated as specific for XCOFF on PowerPC.
Indeed, the property that might be considered more specific to PowerPC,
`NeedsFunctionDescriptors`, was set in `MCAsmInfoXCOFF`.

XCOFF being specific to PowerPC anyway, this patch consolidates the
setting of the properties into `MCAsmInfoXCOFF` except for the cases
that are dependent on the information provided via the
`PPCXCOFFMCAsmInfo` constructor.

This patch also reorders the assignments to the fields to match the
declaration order in `MCAsmInfo`.
llvm/lib/MC/MCAsmInfoXCOFF.cpp
llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp