mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
* 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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user