diff options
Diffstat (limited to 'lib/Bytecode')
-rw-r--r-- | lib/Bytecode/Reader/Reader.cpp | 8 | ||||
-rw-r--r-- | lib/Bytecode/Writer/Writer.cpp | 16 |
2 files changed, 12 insertions, 12 deletions
diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp index cab257f6ec..0b2e935ed4 100644 --- a/lib/Bytecode/Reader/Reader.cpp +++ b/lib/Bytecode/Reader/Reader.cpp @@ -280,12 +280,12 @@ bool BytecodeParser::ParseMethod(const uchar *&Buf, const uchar *EndBuf, 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 @@ bool BytecodeParser::ParseMethod(const uchar *&Buf, const uchar *EndBuf, 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 9ea5d37451..a83bd1642c 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 @@ BytecodeWriter::BytecodeWriter(std::deque<unsigned char> &o, const Module *M) 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 @@ void BytecodeWriter::outputConstants(bool isMethod) { 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 @@ void BytecodeWriter::outputModuleInfoBlock(const Module *M) { 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::processMethod(const Method *M) { 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); |