mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +00:00
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
This commit is contained in:
@@ -44,15 +44,16 @@ class MCSubtargetInfo {
|
||||
const unsigned *ForwardingPaths; // Forwarding paths
|
||||
FeatureBitset FeatureBits; // Feature bits for current CPU + FS
|
||||
|
||||
MCSubtargetInfo() = delete;
|
||||
|
||||
public:
|
||||
void InitMCSubtargetInfo(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(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);
|
||||
|
||||
/// getTargetTriple - Return the target triple string.
|
||||
const Triple &getTargetTriple() const { return TargetTriple; }
|
||||
|
||||
@@ -44,9 +44,17 @@ template <typename T> class SmallVectorImpl;
|
||||
class TargetSubtargetInfo : public MCSubtargetInfo {
|
||||
TargetSubtargetInfo(const TargetSubtargetInfo &) = delete;
|
||||
void operator=(const TargetSubtargetInfo &) = delete;
|
||||
TargetSubtargetInfo() = delete;
|
||||
|
||||
protected: // Can only create subclasses...
|
||||
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);
|
||||
|
||||
public:
|
||||
// AntiDepBreakMode - Type of anti-dependence breaking that should
|
||||
|
||||
Reference in New Issue
Block a user