llvm.org GIT mirror llvm / eda7f44
[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207511 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 6 years ago
13 changed file(s) with 29 addition(s) and 31 deletion(s). Raw diff Collapse all Expand all
33463346 InstructionShuffler(bool alternate, bool topdown)
33473347 : IsAlternating(alternate), IsTopDown(topdown) {}
33483348
3349 virtual void initialize(ScheduleDAGMI*) {
3349 void initialize(ScheduleDAGMI*) override {
33503350 TopQ.clear();
33513351 BottomQ.clear();
33523352 }
33543354 /// Implement MachineSchedStrategy interface.
33553355 /// -----------------------------------------
33563356
3357 virtual SUnit *pickNode(bool &IsTopNode) {
3357 SUnit *pickNode(bool &IsTopNode) override {
33583358 SUnit *SU;
33593359 if (IsTopDown) {
33603360 do {
33773377 return SU;
33783378 }
33793379
3380 virtual void schedNode(SUnit *SU, bool IsTopNode) {}
3381
3382 virtual void releaseTopNode(SUnit *SU) {
3380 void schedNode(SUnit *SU, bool IsTopNode) override {}
3381
3382 void releaseTopNode(SUnit *SU) override {
33833383 TopQ.push(SU);
33843384 }
3385 virtual void releaseBottomNode(SUnit *SU) {
3385 void releaseBottomNode(SUnit *SU) override {
33863386 BottomQ.push(SU);
33873387 }
33883388 };
17831783 }
17841784
17851785 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
1786 void dump(ScheduleDAG *DAG) const {
1786 void dump(ScheduleDAG *DAG) const override {
17871787 // Emulate pop() without clobbering NodeQueueIds.
17881788 std::vector DumpQueue = Queue;
17891789 SF DumpPicker = Picker;
5151 }
5252 llvm_unreachable("A value of instrprof_error has no message.");
5353 }
54 error_condition default_error_condition(int EV) const {
54 error_condition default_error_condition(int EV) const override {
5555 if (EV == instrprof_error::success)
5656 return errc::success;
5757 return errc::invalid_argument;
5656 void processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
5757 RegScavenger *RS) const override;
5858
59 void adjustForSegmentedStacks(MachineFunction &MF) const;
59 void adjustForSegmentedStacks(MachineFunction &MF) const override;
6060
6161 private:
6262 void emitPushInst(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI,
2424 static char ID;
2525 ARMOptimizeBarriersPass() : MachineFunctionPass(ID) {}
2626
27 virtual bool runOnMachineFunction(MachineFunction &Fn);
27 bool runOnMachineFunction(MachineFunction &Fn) override;
2828
29 virtual const char *getPassName() const {
29 const char *getPassName() const override {
3030 return "optimise barriers pass";
3131 }
3232
100100 /// ARMLETargetMachine - ARM little endian target machine.
101101 ///
102102 class ARMLETargetMachine : public ARMTargetMachine {
103 virtual void anchor();
103 void anchor() override;
104104 public:
105105 ARMLETargetMachine(const Target &T, StringRef TT,
106106 StringRef CPU, StringRef FS, const TargetOptions &Options,
111111 /// ARMBETargetMachine - ARM big endian target machine.
112112 ///
113113 class ARMBETargetMachine : public ARMTargetMachine {
114 virtual void anchor();
114 void anchor() override;
115115 public:
116116 ARMBETargetMachine(const Target &T, StringRef TT,
117117 StringRef CPU, StringRef FS, const TargetOptions &Options,
167167 /// ThumbLETargetMachine - Thumb little endian target machine.
168168 ///
169169 class ThumbLETargetMachine : public ThumbTargetMachine {
170 virtual void anchor();
170 void anchor() override;
171171 public:
172172 ThumbLETargetMachine(const Target &T, StringRef TT,
173173 StringRef CPU, StringRef FS, const TargetOptions &Options,
178178 /// ThumbBETargetMachine - Thumb big endian target machine.
179179 ///
180180 class ThumbBETargetMachine : public ThumbTargetMachine {
181 virtual void anchor();
181 void anchor() override;
182182 public:
183183 ThumbBETargetMachine(const Target &T, StringRef TT, StringRef CPU,
184184 StringRef FS, const TargetOptions &Options,
3434 };
3535
3636 class ARMCOFFMCAsmInfoMicrosoft : public MCAsmInfoMicrosoft {
37 void anchor();
37 void anchor() override;
3838 public:
3939 explicit ARMCOFFMCAsmInfoMicrosoft();
4040 };
4141
4242 class ARMCOFFMCAsmInfoGNU : public MCAsmInfoGNUCOFF {
43 void anchor();
43 void anchor() override;
4444 public:
4545 explicit ARMCOFFMCAsmInfoGNU();
4646 };
107107 explicit CppWriter(formatted_raw_ostream &o) :
108108 ModulePass(ID), Out(o), uniqueNum(0), is_inline(false), indent_level(0){}
109109
110 virtual const char *getPassName() const { return "C++ backend"; }
111
112 bool runOnModule(Module &M);
110 const char *getPassName() const override { return "C++ backend"; }
111
112 bool runOnModule(Module &M) override;
113113
114114 void printProgram(const std::string& fname, const std::string& modName );
115115 void printModule(const std::string& fname, const std::string& modName );
2727 CodeGenOpt::Level OL)
2828 : TargetMachine(T, TT, CPU, FS, Options) {}
2929
30 virtual bool addPassesToEmitFile(PassManagerBase &PM,
31 formatted_raw_ostream &Out,
32 CodeGenFileType FileType,
33 bool DisableVerify,
34 AnalysisID StartAfter,
35 AnalysisID StopAfter);
30 bool addPassesToEmitFile(PassManagerBase &PM, formatted_raw_ostream &Out,
31 CodeGenFileType FileType, bool DisableVerify,
32 AnalysisID StartAfter,
33 AnalysisID StopAfter) override;
3634
37 virtual const DataLayout *getDataLayout() const { return nullptr; }
35 const DataLayout *getDataLayout() const override { return nullptr; }
3836 };
3937
4038 extern Target TheCppBackendTarget;
7070 }
7171
7272 bool processBlock(MachineBasicBlock &MBB);
73 bool runOnMachineFunction(MachineFunction &F);
73 bool runOnMachineFunction(MachineFunction &F) override;
7474
7575 private:
7676 Reference getRegReferences(MachineInstr *MI, unsigned Reg);
137137 return "SystemZ Long Branch";
138138 }
139139
140 bool runOnMachineFunction(MachineFunction &F);
140 bool runOnMachineFunction(MachineFunction &F) override;
141141
142142 private:
143143 void skipNonTerminators(BlockPosition &Position, MBBInfo &Block);
3030 }
3131
3232 bool processBlock(MachineBasicBlock &MBB);
33 bool runOnMachineFunction(MachineFunction &F);
33 bool runOnMachineFunction(MachineFunction &F) override;
3434
3535 private:
3636 bool shortenIIF(MachineInstr &MI, unsigned *GPRMap, unsigned LiveOther,
781781 Type *Ty) const override;
782782
783783 /// Intel processors have a unified instruction and data cache
784 const char * getClearCacheBuiltinName() const {
784 const char * getClearCacheBuiltinName() const override {
785785 return nullptr; // nothing to do, move along.
786786 }
787787