Cleanup whitespace
[oota-llvm.git] / lib / Analysis / AliasAnalysisCounter.cpp
index 2649836f573b8ffec4d5baab130c1a808a4ebe71..2e3bc553af3e36833ea6c69ba8425f3f5dfb3412 100644 (file)
@@ -14,7 +14,6 @@
 
 #include "llvm/Analysis/Passes.h"
 #include "llvm/Analysis/AliasAnalysis.h"
-#include "llvm/IR/Writer.h"
 #include "llvm/Pass.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Debug.h"
@@ -75,13 +74,13 @@ namespace {
       }
     }
 
-    bool runOnModule(Module &M) {
+    bool runOnModule(Module &M) override {
       this->M = &M;
       InitializeAliasAnalysis(this);
       return false;
     }
 
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+    void getAnalysisUsage(AnalysisUsage &AU) const override {
       AliasAnalysis::getAnalysisUsage(AU);
       AU.addRequired<AliasAnalysis>();
       AU.setPreservesAll();
@@ -91,25 +90,25 @@ namespace {
     /// 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;
     }
     
     // FIXME: We could count these too...
-    bool pointsToConstantMemory(const Location &Loc, bool OrLocal) {
+    bool pointsToConstantMemory(const Location &Loc, bool OrLocal) override {
       return getAnalysis<AliasAnalysis>().pointsToConstantMemory(Loc, OrLocal);
     }
 
     // Forwarding functions: just delegate to a real AA implementation, counting
     // the number of responses...
-    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);
     }
   };
@@ -138,10 +137,10 @@ AliasAnalysisCounter::alias(const Location &LocA, const Location &LocB) {
   if (PrintAll || (PrintAllFailures && R == MayAlias)) {
     errs() << AliasString << ":\t";
     errs() << "[" << LocA.Size << "B] ";
-    WriteAsOperand(errs(), LocA.Ptr, true, M);
+    LocA.Ptr->printAsOperand(errs(), true, M);
     errs() << ", ";
     errs() << "[" << LocB.Size << "B] ";
-    WriteAsOperand(errs(), LocB.Ptr, true, M);
+    LocB.Ptr->printAsOperand(errs(), true, M);
     errs() << "\n";
   }
 
@@ -164,7 +163,7 @@ AliasAnalysisCounter::getModRefInfo(ImmutableCallSite CS,
   if (PrintAll || (PrintAllFailures && R == ModRef)) {
     errs() << MRString << ":  Ptr: ";
     errs() << "[" << Loc.Size << "B] ";
-    WriteAsOperand(errs(), Loc.Ptr, true, M);
+    Loc.Ptr->printAsOperand(errs(), true, M);
     errs() << "\t<->" << *CS.getInstruction() << '\n';
   }
   return R;