summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Reader/InstructionReader.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-09 04:14:01 +0000
committerChris Lattner <sabre@nondot.org>2004-02-09 04:14:01 +0000
commitfa829be4d348aeec4cb89760960179e71ad5746f (patch)
tree5715ba4d300721dc59e3700891b6cb037f476ee3 /llvm/lib/Bytecode/Reader/InstructionReader.cpp
parentf5a4e33e497d161491c1ae5320e8cc30e2a7a243 (diff)
downloadbcm5719-llvm-fa829be4d348aeec4cb89760960179e71ad5746f.tar.gz
bcm5719-llvm-fa829be4d348aeec4cb89760960179e71ad5746f.zip
Start using the new and improve interface to FunctionType arguments
llvm-svn: 11224
Diffstat (limited to 'llvm/lib/Bytecode/Reader/InstructionReader.cpp')
-rw-r--r--llvm/lib/Bytecode/Reader/InstructionReader.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/llvm/lib/Bytecode/Reader/InstructionReader.cpp b/llvm/lib/Bytecode/Reader/InstructionReader.cpp
index 21a1490397a..8912704c6f6 100644
--- a/llvm/lib/Bytecode/Reader/InstructionReader.cpp
+++ b/llvm/lib/Bytecode/Reader/InstructionReader.cpp
@@ -218,16 +218,16 @@ void BytecodeParser::ParseInstruction(const unsigned char *&Buf,
if (FTy == 0) throw std::string("Call to non function pointer value!");
std::vector<Value *> Params;
- const FunctionType::ParamTypes &PL = FTy->getParamTypes();
-
if (!FTy->isVarArg()) {
- FunctionType::ParamTypes::const_iterator It = PL.begin();
+ FunctionType::param_iterator It = FTy->param_begin();
for (unsigned i = 1, e = Args.size(); i != e; ++i) {
- if (It == PL.end()) throw std::string("Invalid call instruction!");
+ if (It == FTy->param_end())
+ throw std::string("Invalid call instruction!");
Params.push_back(getValue(getTypeSlot(*It++), Args[i]));
}
- if (It != PL.end()) throw std::string("Invalid call instruction!");
+ if (It != FTy->param_end())
+ throw std::string("Invalid call instruction!");
} else {
Args.erase(Args.begin(), Args.begin()+1+hasVarArgCallPadding);
@@ -268,18 +268,18 @@ void BytecodeParser::ParseInstruction(const unsigned char *&Buf,
std::vector<Value *> Params;
BasicBlock *Normal, *Except;
- const FunctionType::ParamTypes &PL = FTy->getParamTypes();
-
if (!FTy->isVarArg()) {
Normal = getBasicBlock(Args[1]);
Except = getBasicBlock(Args[2]);
- FunctionType::ParamTypes::const_iterator It = PL.begin();
+ FunctionType::param_iterator It = FTy->param_begin();
for (unsigned i = 3, e = Args.size(); i != e; ++i) {
- if (It == PL.end()) throw std::string("Invalid invoke instruction!");
+ if (It == FTy->param_end())
+ throw std::string("Invalid invoke instruction!");
Params.push_back(getValue(getTypeSlot(*It++), Args[i]));
}
- if (It != PL.end()) throw std::string("Invalid invoke instruction!");
+ if (It != FTy->param_end())
+ throw std::string("Invalid invoke instruction!");
} else {
Args.erase(Args.begin(), Args.begin()+1+hasVarArgCallPadding);
OpenPOWER on IntegriCloud