summaryrefslogtreecommitdiff
path: root/lib/Analysis/IPA
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/IPA')
-rw-r--r--lib/Analysis/IPA/CallGraphSCCPass.cpp22
-rw-r--r--lib/Analysis/IPA/GlobalsModRef.cpp22
2 files changed, 22 insertions, 22 deletions
diff --git a/lib/Analysis/IPA/CallGraphSCCPass.cpp b/lib/Analysis/IPA/CallGraphSCCPass.cpp
index a3f77b7eb4..aafc085061 100644
--- a/lib/Analysis/IPA/CallGraphSCCPass.cpp
+++ b/lib/Analysis/IPA/CallGraphSCCPass.cpp
@@ -49,7 +49,7 @@ public:
/// run - Execute all of the passes scheduled for execution. Keep track of
/// whether any of the passes modifies the module, and if so, return true.
- bool runOnModule(Module &M);
+ bool runOnModule(Module &M) override;
using ModulePass::doInitialization;
using ModulePass::doFinalization;
@@ -58,21 +58,21 @@ public:
bool doFinalization(CallGraph &CG);
/// Pass Manager itself does not invalidate any analysis info.
- void getAnalysisUsage(AnalysisUsage &Info) const {
+ void getAnalysisUsage(AnalysisUsage &Info) const override {
// CGPassManager walks SCC and it needs CallGraph.
Info.addRequired<CallGraphWrapperPass>();
Info.setPreservesAll();
}
- virtual const char *getPassName() const {
+ const char *getPassName() const override {
return "CallGraph Pass Manager";
}
- virtual PMDataManager *getAsPMDataManager() { return this; }
- virtual Pass *getAsPass() { return this; }
+ PMDataManager *getAsPMDataManager() override { return this; }
+ Pass *getAsPass() override { return this; }
// Print passes managed by this manager
- void dumpPassStructure(unsigned Offset) {
+ void dumpPassStructure(unsigned Offset) override {
errs().indent(Offset*2) << "Call Graph SCC Pass Manager\n";
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
Pass *P = getContainedPass(Index);
@@ -86,7 +86,7 @@ public:
return static_cast<Pass *>(PassVector[N]);
}
- virtual PassManagerType getPassManagerType() const {
+ PassManagerType getPassManagerType() const override {
return PMT_CallGraphPassManager;
}
@@ -590,12 +590,12 @@ namespace {
static char ID;
PrintCallGraphPass(const std::string &B, raw_ostream &o)
: CallGraphSCCPass(ID), Banner(B), Out(o) {}
-
- virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+
+ void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesAll();
}
-
- bool runOnSCC(CallGraphSCC &SCC) {
+
+ bool runOnSCC(CallGraphSCC &SCC) override {
Out << Banner;
for (CallGraphSCC::iterator I = SCC.begin(), E = SCC.end(); I != E; ++I)
(*I)->getFunction()->print(Out);
diff --git a/lib/Analysis/IPA/GlobalsModRef.cpp b/lib/Analysis/IPA/GlobalsModRef.cpp
index f2133f6775..dac9bd24a4 100644
--- a/lib/Analysis/IPA/GlobalsModRef.cpp
+++ b/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;