MC: Remove MCSubtargetInfo() default constructor
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 10 Jul 2015 22:43:42 +0000 (22:43 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 10 Jul 2015 22:43:42 +0000 (22:43 +0000)
commit16859aa24261e91923533c0d9f4b661e8850fa2d
tree290c21290b7c037b62832576fe06a1cd8085e394
parent5733fd14d45a27af5f5f45a568187bed78a35875
MC: Remove MCSubtargetInfo() default constructor

Force all creators of `MCSubtargetInfo` to immediately initialize it,
merging the default constructor and the initializer into an initializing
constructor.  Besides cleaning up the code a little, this makes it clear
that the initializer is never called again later.

Out-of-tree backends need a trivial change: instead of calling:

    auto *X = new MCSubtargetInfo();
    InitXYZMCSubtargetInfo(X, ...);
    return X;

they should call:

    return createXYZMCSubtargetInfoImpl(...);

There's no real functionality change here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241957 91177308-0d34-0410-b5e6-96231b3b80d8
18 files changed:
include/llvm/MC/MCSubtargetInfo.h
include/llvm/Target/TargetSubtargetInfo.h
lib/MC/MCSubtargetInfo.cpp
lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp
lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.cpp
lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.cpp
lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp
lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp
lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp
lib/Target/NVPTX/MCTargetDesc/NVPTXMCTargetDesc.cpp
lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp
lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp
lib/Target/TargetSubtargetInfo.cpp
lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp
utils/TableGen/SubtargetEmitter.cpp