mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
[C++11] Add 'override' keyword to virtual methods that override their base class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202953 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -27,7 +27,7 @@ namespace {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
Hello() : FunctionPass(ID) {}
|
||||
|
||||
virtual bool runOnFunction(Function &F) {
|
||||
bool runOnFunction(Function &F) override {
|
||||
++HelloCounter;
|
||||
errs() << "Hello: ";
|
||||
errs().write_escaped(F.getName()) << '\n';
|
||||
@ -45,7 +45,7 @@ namespace {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
Hello2() : FunctionPass(ID) {}
|
||||
|
||||
virtual bool runOnFunction(Function &F) {
|
||||
bool runOnFunction(Function &F) override {
|
||||
++HelloCounter;
|
||||
errs() << "Hello: ";
|
||||
errs().write_escaped(F.getName()) << '\n';
|
||||
@ -53,7 +53,7 @@ namespace {
|
||||
}
|
||||
|
||||
// We don't modify the program, so we preserve all analyses.
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
void getAnalysisUsage(AnalysisUsage &AU) const override {
|
||||
AU.setPreservesAll();
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user