* 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
diff --git a/lib/Target/SparcV9/SparcV9TargetMachine.cpp b/lib/Target/SparcV9/SparcV9TargetMachine.cpp
index de778e2..306b85a 100644
--- a/lib/Target/SparcV9/SparcV9TargetMachine.cpp
+++ b/lib/Target/SparcV9/SparcV9TargetMachine.cpp
@@ -126,21 +126,21 @@
 // Native code generation for a specified target.
 //===---------------------------------------------------------------------===//
 
-class ConstructMachineCodeForFunction : public MethodPass {
+class ConstructMachineCodeForFunction : public FunctionPass {
   TargetMachine &Target;
 public:
   inline ConstructMachineCodeForFunction(TargetMachine &T) : Target(T) {}
-  bool runOnMethod(Function *F) {
+  bool runOnFunction(Function *F) {
     MachineCodeForMethod::construct(F, Target);
     return false;
   }
 };
 
-class InstructionSelection : public MethodPass {
+class InstructionSelection : public FunctionPass {
   TargetMachine &Target;
 public:
   inline InstructionSelection(TargetMachine &T) : Target(T) {}
-  bool runOnMethod(Function *F) {
+  bool runOnFunction(Function *F) {
     if (SelectInstructionsForMethod(F, Target)) {
       cerr << "Instr selection failed for function " << F->getName() << "\n";
       abort();
@@ -149,12 +149,12 @@
   }
 };
 
-struct FreeMachineCodeForFunction : public MethodPass {
+struct FreeMachineCodeForFunction : public FunctionPass {
   static void freeMachineCode(Instruction *I) {
     MachineCodeForInstruction::destroy(I);
   }
   
-  bool runOnMethod(Function *F) {
+  bool runOnFunction(Function *F) {
     for (Function::iterator FI = F->begin(), FE = F->end(); FI != FE; ++FI)
       for (BasicBlock::iterator I = (*FI)->begin(), E = (*FI)->end();
            I != E; ++I)
@@ -197,7 +197,7 @@
   // allowing machine code representations for functions to be free'd after the
   // function has been emitted.
   //
-  PM.add(getMethodAsmPrinterPass(PM, Out));
+  PM.add(getFunctionAsmPrinterPass(PM, Out));
   PM.add(new FreeMachineCodeForFunction());  // Free stuff no longer needed
 
   // Emit Module level assembly after all of the functions have been processed.