MC: Only allow changing feature bits in MCSubtargetInfo
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 10 Jul 2015 22:52:15 +0000 (22:52 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 10 Jul 2015 22:52:15 +0000 (22:52 +0000)
commitc9978bab4bc4bafc2d2d2ca2c76f48c02c274df4
tree2fc6bb857a822e187384a43a573d1d8be6818a6d
parentce43851064d869019311df2b81a0a530cd61a784
MC: Only allow changing feature bits in MCSubtargetInfo

Disallow all mutation of `MCSubtargetInfo` expect the feature bits.

Besides deleting the assignment operators -- which were dead "code" --
this restricts `InitMCProcessorInfo()` to subclass initialization
sequences, and exposes a new more limited function called
`setDefaultFeatures()` for use by the ARMAsmParser `.cpu` directive.

There's a small functional change here: ARMAsmParser used to adjust
`MCSubtargetInfo::CPUSchedModel` as a side effect of calling
`InitMCProcessorInfo()`, but I've removed that suspicious behaviour.
Since the AsmParser shouldn't be doing any scheduling, there shouldn't
be any observable change...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241961 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCSubtargetInfo.h
lib/MC/MCSubtargetInfo.cpp
lib/Target/ARM/AsmParser/ARMAsmParser.cpp