diff --git a/llvm/include/llvm/Analysis/LoopPass.h b/llvm/include/llvm/Analysis/LoopPass.h index 7b878abadf17..a231598417c3 100644 --- a/llvm/include/llvm/Analysis/LoopPass.h +++ b/llvm/include/llvm/Analysis/LoopPass.h @@ -81,7 +81,7 @@ public: return FP; } - virtual PassManagerType getPassManagerType() { + virtual PassManagerType getPassManagerType() const { return PMT_LoopPassManager; } diff --git a/llvm/include/llvm/PassManagers.h b/llvm/include/llvm/PassManagers.h index bd3672f944ac..2448ddad463e 100644 --- a/llvm/include/llvm/PassManagers.h +++ b/llvm/include/llvm/PassManagers.h @@ -250,7 +250,7 @@ public: return PassVector.size(); } - virtual PassManagerType getPassManagerType() { + virtual PassManagerType getPassManagerType() const { assert ( 0 && "Invalid use of getPassManagerType"); return PMT_Unknown; } @@ -322,7 +322,7 @@ public: return FP; } - virtual PassManagerType getPassManagerType() { + virtual PassManagerType getPassManagerType() const { return PMT_FunctionPassManager; } }; diff --git a/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp b/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp index 4a51be35bf69..c317a112f5a6 100644 --- a/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp +++ b/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp @@ -66,7 +66,7 @@ public: return FP; } - virtual PassManagerType getPassManagerType() { + virtual PassManagerType getPassManagerType() const { return PMT_CallGraphPassManager; } }; diff --git a/llvm/lib/VMCore/PassManager.cpp b/llvm/lib/VMCore/PassManager.cpp index bc85967ee1c0..a2bbb7d3ab9b 100644 --- a/llvm/lib/VMCore/PassManager.cpp +++ b/llvm/lib/VMCore/PassManager.cpp @@ -98,7 +98,7 @@ public: return BP; } - virtual PassManagerType getPassManagerType() { + virtual PassManagerType getPassManagerType() const { return PMT_BasicBlockPassManager; } }; @@ -210,7 +210,9 @@ public: return MP; } - virtual PassManagerType getPassManagerType() { return PMT_ModulePassManager; } + virtual PassManagerType getPassManagerType() const { + return PMT_ModulePassManager; + } }; //===----------------------------------------------------------------------===//