summaryrefslogtreecommitdiff
path: root/lib/Bytecode
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-04-04 22:19:18 +0000
committerChris Lattner <sabre@nondot.org>2002-04-04 22:19:18 +0000
commit2aac6bf66a4f4486e14ee5bdc96277ec770afdc7 (patch)
tree7c0149ec42632ae549ecdb13e45c1ec780eb3063 /lib/Bytecode
parent3d0dceb733fe8d5d916eab58d923eb7ff491d6c6 (diff)
downloadllvm-2aac6bf66a4f4486e14ee5bdc96277ec770afdc7.tar.gz
llvm-2aac6bf66a4f4486e14ee5bdc96277ec770afdc7.tar.bz2
llvm-2aac6bf66a4f4486e14ee5bdc96277ec770afdc7.tar.xz
s/MethodType/FunctionType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2115 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode')
-rw-r--r--lib/Bytecode/Reader/InstructionReader.cpp12
-rw-r--r--lib/Bytecode/Writer/InstructionWriter.cpp4
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/Bytecode/Reader/InstructionReader.cpp b/lib/Bytecode/Reader/InstructionReader.cpp
index 8402db5e82..2d28db1b4c 100644
--- a/lib/Bytecode/Reader/InstructionReader.cpp
+++ b/lib/Bytecode/Reader/InstructionReader.cpp
@@ -230,14 +230,14 @@ bool BytecodeParser::ParseInstruction(const uchar *&Buf, const uchar *EndBuf,
// Check to make sure we have a pointer to method type
PointerType *PTy = dyn_cast<PointerType>(M->getType());
if (PTy == 0) return failure(true);
- MethodType *MTy = dyn_cast<MethodType>(PTy->getElementType());
+ FunctionType *MTy = dyn_cast<FunctionType>(PTy->getElementType());
if (MTy == 0) return failure(true);
vector<Value *> Params;
- const MethodType::ParamTypes &PL = MTy->getParamTypes();
+ const FunctionType::ParamTypes &PL = MTy->getParamTypes();
if (!MTy->isVarArg()) {
- MethodType::ParamTypes::const_iterator It = PL.begin();
+ FunctionType::ParamTypes::const_iterator It = PL.begin();
switch (Raw.NumOperands) {
case 0: cerr << "Invalid call instruction encountered!\n";
@@ -290,11 +290,11 @@ bool BytecodeParser::ParseInstruction(const uchar *&Buf, const uchar *EndBuf,
// Check to make sure we have a pointer to method type
PointerType *PTy = dyn_cast<PointerType>(M->getType());
if (PTy == 0) return failure(true);
- MethodType *MTy = dyn_cast<MethodType>(PTy->getElementType());
+ FunctionType *MTy = dyn_cast<FunctionType>(PTy->getElementType());
if (MTy == 0) return failure(true);
vector<Value *> Params;
- const MethodType::ParamTypes &PL = MTy->getParamTypes();
+ const FunctionType::ParamTypes &PL = MTy->getParamTypes();
vector<unsigned> &args = *Raw.VarArgs;
BasicBlock *Normal, *Except;
@@ -305,7 +305,7 @@ bool BytecodeParser::ParseInstruction(const uchar *&Buf, const uchar *EndBuf,
Normal = cast<BasicBlock>(getValue(Type::LabelTy, Raw.Arg2));
Except = cast<BasicBlock>(getValue(Type::LabelTy, args[0]));
- MethodType::ParamTypes::const_iterator It = PL.begin();
+ FunctionType::ParamTypes::const_iterator It = PL.begin();
for (unsigned i = 1; i < args.size(); i++) {
if (It == PL.end()) return failure(true);
// TODO: Check getValue for null!
diff --git a/lib/Bytecode/Writer/InstructionWriter.cpp b/lib/Bytecode/Writer/InstructionWriter.cpp
index f047ab5e1c..0be903aad0 100644
--- a/lib/Bytecode/Writer/InstructionWriter.cpp
+++ b/lib/Bytecode/Writer/InstructionWriter.cpp
@@ -226,13 +226,13 @@ void BytecodeWriter::processInstruction(const Instruction *I) {
NumOperands++;
} else if (const CallInst *CI = dyn_cast<CallInst>(I)) {// Handle VarArg calls
PointerType *Ty = cast<PointerType>(CI->getCalledValue()->getType());
- if (cast<MethodType>(Ty->getElementType())->isVarArg()) {
+ if (cast<FunctionType>(Ty->getElementType())->isVarArg()) {
outputInstrVarArgsCall(I, Table, Type, Out);
return;
}
} else if (const InvokeInst *II = dyn_cast<InvokeInst>(I)) { // ... & Invokes
PointerType *Ty = cast<PointerType>(II->getCalledValue()->getType());
- if (cast<MethodType>(Ty->getElementType())->isVarArg()) {
+ if (cast<FunctionType>(Ty->getElementType())->isVarArg()) {
outputInstrVarArgsCall(I, Table, Type, Out);
return;
}