diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-07-10 22:43:42 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-07-10 22:43:42 +0000 |
commit | 754e21f24462b5690707580d5f14220ea363ee19 (patch) | |
tree | becc3083c9af013863bec6c056d8da39d9d435a6 /llvm/lib/Target/TargetSubtargetInfo.cpp | |
parent | bb57d73805449f9c36de2bd14a44e8cd4ff36d4a (diff) | |
download | bcm5719-llvm-754e21f24462b5690707580d5f14220ea363ee19.tar.gz bcm5719-llvm-754e21f24462b5690707580d5f14220ea363ee19.zip |
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.
llvm-svn: 241957
Diffstat (limited to 'llvm/lib/Target/TargetSubtargetInfo.cpp')
-rw-r--r-- | llvm/lib/Target/TargetSubtargetInfo.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/Target/TargetSubtargetInfo.cpp b/llvm/lib/Target/TargetSubtargetInfo.cpp index 87df7af8452..6a61fcdf0f8 100644 --- a/llvm/lib/Target/TargetSubtargetInfo.cpp +++ b/llvm/lib/Target/TargetSubtargetInfo.cpp @@ -19,7 +19,14 @@ using namespace llvm; //--------------------------------------------------------------------------- // TargetSubtargetInfo Class // -TargetSubtargetInfo::TargetSubtargetInfo() {} +TargetSubtargetInfo::TargetSubtargetInfo( + const Triple &TT, StringRef CPU, StringRef FS, + ArrayRef<SubtargetFeatureKV> PF, ArrayRef<SubtargetFeatureKV> PD, + const SubtargetInfoKV *ProcSched, const MCWriteProcResEntry *WPR, + const MCWriteLatencyEntry *WL, const MCReadAdvanceEntry *RA, + const InstrStage *IS, const unsigned *OC, const unsigned *FP) + : MCSubtargetInfo(TT, CPU, FS, PF, PD, ProcSched, WPR, WL, RA, IS, OC, FP) { +} TargetSubtargetInfo::~TargetSubtargetInfo() {} |