summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/ExtractFunction.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-09-20 04:48:05 +0000
committerChris Lattner <sabre@nondot.org>2004-09-20 04:48:05 +0000
commit4f2cf030e899f5fea5c2760326c853e89a2e8235 (patch)
tree88ec23feccde977902434fd327c6d95671c475fe /llvm/lib/Transforms/IPO/ExtractFunction.cpp
parent79e523de04b67fc0fbc73baf6605707b7aa91e65 (diff)
downloadbcm5719-llvm-4f2cf030e899f5fea5c2760326c853e89a2e8235.tar.gz
bcm5719-llvm-4f2cf030e899f5fea5c2760326c853e89a2e8235.zip
'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass. Instead of implementing Pass::run, then should implement ModulePass::runOnModule. llvm-svn: 16436
Diffstat (limited to 'llvm/lib/Transforms/IPO/ExtractFunction.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/ExtractFunction.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/ExtractFunction.cpp b/llvm/lib/Transforms/IPO/ExtractFunction.cpp
index 41b796035b2..1b92fd1df8d 100644
--- a/llvm/lib/Transforms/IPO/ExtractFunction.cpp
+++ b/llvm/lib/Transforms/IPO/ExtractFunction.cpp
@@ -17,7 +17,7 @@
using namespace llvm;
namespace {
- class FunctionExtractorPass : public Pass {
+ class FunctionExtractorPass : public ModulePass {
Function *Named;
bool deleteFunc;
public:
@@ -28,7 +28,7 @@ namespace {
FunctionExtractorPass(Function *F = 0, bool deleteFn = true)
: Named(F), deleteFunc(deleteFn) {}
- bool run(Module &M) {
+ bool runOnModule(Module &M) {
if (Named == 0) {
Named = M.getMainFunction();
if (Named == 0) return false; // No function to extract
@@ -112,6 +112,6 @@ namespace {
RegisterPass<FunctionExtractorPass> X("extract", "Function Extractor");
}
-Pass *llvm::createFunctionExtractionPass(Function *F, bool deleteFn) {
+ModulePass *llvm::createFunctionExtractionPass(Function *F, bool deleteFn) {
return new FunctionExtractorPass(F, deleteFn);
}
OpenPOWER on IntegriCloud