diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-27 06:56:12 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-27 06:56:12 +0000 |
commit | f57b845547302d24ecb6a9e79d7bc386f761a6c9 (patch) | |
tree | 369bc5be013a3a6d0373dbf26820d701e01c5297 /include/llvm/Assembly | |
parent | f2361c5e5c2917e6f19a55927b221d8671753a40 (diff) | |
download | llvm-f57b845547302d24ecb6a9e79d7bc386f761a6c9.tar.gz llvm-f57b845547302d24ecb6a9e79d7bc386f761a6c9.tar.bz2 llvm-f57b845547302d24ecb6a9e79d7bc386f761a6c9.tar.xz |
* Rename MethodPass class to FunctionPass
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
- Method is now const
- It now takes one AnalysisUsage object to fill in instead of 3 vectors
to fill in
- Pass's now specify which other passes they _preserve_ not which ones
they modify (be conservative!)
- A pass can specify that it preserves all analyses (because it never
modifies the underlying program)
* s/Method/Function/g in other random places as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2333 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Assembly')
-rw-r--r-- | include/llvm/Assembly/PrintModulePass.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/include/llvm/Assembly/PrintModulePass.h b/include/llvm/Assembly/PrintModulePass.h index eceaf3a888..fbab4e4a45 100644 --- a/include/llvm/Assembly/PrintModulePass.h +++ b/include/llvm/Assembly/PrintModulePass.h @@ -1,9 +1,10 @@ //===- llvm/Assembly/PrintModulePass.h - Printing Pass -----------*- C++ -*--=// // -// This file defines two passes to print out a module. The PrintModulePass -// pass simply prints out the entire module when it is executed. The -// PrintMethodPass class is designed to be pipelined with other MethodPass's, -// and prints out the methods of the class as they are processed. +// This file defines two passes to print out a module. The PrintModulePass pass +// simply prints out the entire module when it is executed. The +// PrintFunctionPass class is designed to be pipelined with other +// FunctionPass's, and prints out the functions of the class as they are +// processed. // //===----------------------------------------------------------------------===// @@ -32,8 +33,8 @@ public: } }; -class PrintFunctionPass : public MethodPass { - std::string Banner; // String to print before each method +class PrintFunctionPass : public FunctionPass { + std::string Banner; // String to print before each function std::ostream *Out; // ostream to print on bool DeleteStream; // Delete the ostream in our dtor? public: @@ -46,10 +47,10 @@ public: if (DeleteStream) delete Out; } - // runOnMethod - This pass just prints a banner followed by the method as + // runOnFunction - This pass just prints a banner followed by the function as // it's processed. // - bool runOnMethod(Function *F) { + bool runOnFunction(Function *F) { (*Out) << Banner << (Value*)F; return false; } |