aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Reader/ConstantReader.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-07-25 22:47:55 +0000
committerChris Lattner <sabre@nondot.org>2001-07-25 22:47:55 +0000
commite5a57ee363ecceb1f0047da7d8e72460965ec102 (patch)
tree22226613c39a2e2028cb781020aca3e9b27591d6 /lib/Bytecode/Reader/ConstantReader.cpp
parent8b81bf5046cdc76d217396c1f42bb7d784619e5e (diff)
Add support for extern varargs methods & varargs method calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Reader/ConstantReader.cpp')
-rw-r--r--lib/Bytecode/Reader/ConstantReader.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Bytecode/Reader/ConstantReader.cpp b/lib/Bytecode/Reader/ConstantReader.cpp
index 2994128f7d..e367d02e7c 100644
--- a/lib/Bytecode/Reader/ConstantReader.cpp
+++ b/lib/Bytecode/Reader/ConstantReader.cpp
@@ -33,15 +33,15 @@ bool BytecodeParser::parseTypeConstant(const uchar *&Buf, const uchar *EndBuf,
const Type *RetType = getType(Typ);
if (RetType == 0) return true;
- MethodType::ParamTypes Params;
+ unsigned NumParams;
+ if (read_vbr(Buf, EndBuf, NumParams)) return true;
- if (read_vbr(Buf, EndBuf, Typ)) return true;
- while (Typ) {
+ MethodType::ParamTypes Params;
+ while (NumParams--) {
+ if (read_vbr(Buf, EndBuf, Typ)) return true;
const Type *Ty = getType(Typ);
if (Ty == 0) return true;
Params.push_back(Ty);
-
- if (read_vbr(Buf, EndBuf, Typ)) return true;
}
Val = MethodType::getMethodType(RetType, Params);