diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-03-05 07:30:04 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-03-05 07:30:04 +0000 |
commit | e9ba759c816ee74fe4c7a780a77726bc66c42899 (patch) | |
tree | 7ba7261e0df528222dfec5e45d46e2c79cffbc51 /llvm/lib/Analysis/IPA/GlobalsModRef.cpp | |
parent | 2759a7c9c06f2ace5ad9cd04bd054c4c5825897e (diff) | |
download | bcm5719-llvm-e9ba759c816ee74fe4c7a780a77726bc66c42899.tar.gz bcm5719-llvm-e9ba759c816ee74fe4c7a780a77726bc66c42899.zip |
[C++11] Add 'override' keyword to virtual methods that override their base class.
llvm-svn: 202945
Diffstat (limited to 'llvm/lib/Analysis/IPA/GlobalsModRef.cpp')
-rw-r--r-- | llvm/lib/Analysis/IPA/GlobalsModRef.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp index f2133f67751..dac9bd24a47 100644 --- a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp +++ b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp @@ -94,7 +94,7 @@ namespace { initializeGlobalsModRefPass(*PassRegistry::getPassRegistry()); } - bool runOnModule(Module &M) { + bool runOnModule(Module &M) override { InitializeAliasAnalysis(this); // Find non-addr taken globals. @@ -105,7 +105,7 @@ namespace { return false; } - virtual void getAnalysisUsage(AnalysisUsage &AU) const { + void getAnalysisUsage(AnalysisUsage &AU) const override { AliasAnalysis::getAnalysisUsage(AU); AU.addRequired<CallGraphWrapperPass>(); AU.setPreservesAll(); // Does not transform code @@ -114,18 +114,18 @@ namespace { //------------------------------------------------ // Implement the AliasAnalysis API // - AliasResult alias(const Location &LocA, const Location &LocB); + AliasResult alias(const Location &LocA, const Location &LocB) override; ModRefResult getModRefInfo(ImmutableCallSite CS, - const Location &Loc); + const Location &Loc) override; ModRefResult getModRefInfo(ImmutableCallSite CS1, - ImmutableCallSite CS2) { + ImmutableCallSite CS2) override { return AliasAnalysis::getModRefInfo(CS1, CS2); } /// getModRefBehavior - Return the behavior of the specified function if /// called from the specified call site. The call site may be null in which /// case the most generic behavior of this function should be returned. - ModRefBehavior getModRefBehavior(const Function *F) { + ModRefBehavior getModRefBehavior(const Function *F) override { ModRefBehavior Min = UnknownModRefBehavior; if (FunctionRecord *FR = getFunctionInfo(F)) { @@ -141,7 +141,7 @@ namespace { /// getModRefBehavior - Return the behavior of the specified function if /// called from the specified call site. The call site may be null in which /// case the most generic behavior of this function should be returned. - ModRefBehavior getModRefBehavior(ImmutableCallSite CS) { + ModRefBehavior getModRefBehavior(ImmutableCallSite CS) override { ModRefBehavior Min = UnknownModRefBehavior; if (const Function* F = CS.getCalledFunction()) @@ -155,15 +155,15 @@ namespace { return ModRefBehavior(AliasAnalysis::getModRefBehavior(CS) & Min); } - virtual void deleteValue(Value *V); - virtual void copyValue(Value *From, Value *To); - virtual void addEscapingUse(Use &U); + void deleteValue(Value *V) override; + void copyValue(Value *From, Value *To) override; + void addEscapingUse(Use &U) override; /// getAdjustedAnalysisPointer - This method is used when a pass implements /// an analysis interface through multiple inheritance. If needed, it /// should override this to adjust the this pointer as needed for the /// specified pass info. - virtual void *getAdjustedAnalysisPointer(AnalysisID PI) { + void *getAdjustedAnalysisPointer(AnalysisID PI) override { if (PI == &AliasAnalysis::ID) return (AliasAnalysis*)this; return this; |