Change references from Method to Function
change references from MethodARgument to FunctionArgument


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1991 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp
index cab257f..0b2e935 100644
--- a/lib/Bytecode/Reader/Reader.cpp
+++ b/lib/Bytecode/Reader/Reader.cpp
@@ -280,12 +280,12 @@
   const MethodType::ParamTypes &Params = MTy->getParamTypes();
   for (MethodType::ParamTypes::const_iterator It = Params.begin();
        It != Params.end(); ++It) {
-    MethodArgument *MA = new MethodArgument(*It);
-    if (insertValue(MA, Values) == -1) {
+    FunctionArgument *FA = new FunctionArgument(*It);
+    if (insertValue(FA, Values) == -1) {
       Error = "Error reading method arguments!\n";
       delete M; return failure(true); 
     }
-    M->getArgumentList().push_back(MA);
+    M->getArgumentList().push_back(FA);
   }
 
   while (Buf < EndBuf) {
@@ -352,7 +352,7 @@
   assert(!getTypeSlot(MTy, type) && "How can meth type not exist?");
   getTypeSlot(PMTy, type);
 
-  C->getMethodList().push_back(M);
+  C->getFunctionList().push_back(M);
 
   // Replace placeholder with the real method pointer...
   ModuleValues[type][MethSlot] = M;
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp
index 9ea5d37..a83bd16 100644
--- a/lib/Bytecode/Writer/Writer.cpp
+++ b/lib/Bytecode/Writer/Writer.cpp
@@ -25,7 +25,7 @@
 #include "WriterInternals.h"
 #include "llvm/Module.h"
 #include "llvm/GlobalVariable.h"
-#include "llvm/Method.h"
+#include "llvm/Function.h"
 #include "llvm/BasicBlock.h"
 #include "llvm/ConstantVals.h"
 #include "llvm/SymbolTable.h"
@@ -61,7 +61,7 @@
     outputSymbolTable(*M->getSymbolTable());
 }
 
-void BytecodeWriter::outputConstants(bool isMethod) {
+void BytecodeWriter::outputConstants(bool isFunction) {
   BytecodeBlock CPool(BytecodeFormat::ConstantPool, Out);
 
   unsigned NumPlanes = Table.getNumPlanes();
@@ -70,13 +70,13 @@
     if (Plane.empty()) continue;      // Skip empty type planes...
 
     unsigned ValNo = 0;
-    if (isMethod)                     // Don't reemit module constants
+    if (isFunction)                   // Don't reemit module constants
       ValNo = Table.getModuleLevel(pno);
     else if (pno == Type::TypeTyID)
       ValNo = Type::FirstDerivedTyID; // Start emitting at the derived types...
     
     // Scan through and ignore method arguments...
-    for (; ValNo < Plane.size() && isa<MethodArgument>(Plane[ValNo]); ValNo++)
+    for (; ValNo < Plane.size() && isa<FunctionArgument>(Plane[ValNo]); ValNo++)
       /*empty*/;
 
     unsigned NC = ValNo;              // Number of constants
@@ -149,8 +149,8 @@
   align32(Out);
 }
 
-void BytecodeWriter::processMethod(const Method *M) {
-  BytecodeBlock MethodBlock(BytecodeFormat::Method, Out);
+void BytecodeWriter::processMethod(const Function *M) {
+  BytecodeBlock FunctionBlock(BytecodeFormat::Method, Out);
   output_vbr((unsigned)M->hasInternalLinkage(), Out);
   // Only output the constant pool and other goodies if needed...
   if (!M->isExternal()) {
@@ -175,14 +175,14 @@
 
 
 void BytecodeWriter::processBasicBlock(const BasicBlock *BB) {
-  BytecodeBlock MethodBlock(BytecodeFormat::BasicBlock, Out);
+  BytecodeBlock FunctionBlock(BytecodeFormat::BasicBlock, Out);
   // Process all the instructions in the bb...
   for_each(BB->begin(), BB->end(),
 	   bind_obj(this, &BytecodeWriter::processInstruction));
 }
 
 void BytecodeWriter::outputSymbolTable(const SymbolTable &MST) {
-  BytecodeBlock MethodBlock(BytecodeFormat::SymbolTable, Out);
+  BytecodeBlock FunctionBlock(BytecodeFormat::SymbolTable, Out);
 
   for (SymbolTable::const_iterator TI = MST.begin(); TI != MST.end(); ++TI) {
     SymbolTable::type_const_iterator I = MST.type_begin(TI->first);