From d21cd809b656d3011ec089536857e048e037159c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 9 Feb 2004 04:37:31 +0000 Subject: Adjust to the changed StructType interface. In particular, getElementTypes() is gone. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11228 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Bytecode/Reader/ConstantReader.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/Bytecode/Reader/ConstantReader.cpp') diff --git a/lib/Bytecode/Reader/ConstantReader.cpp b/lib/Bytecode/Reader/ConstantReader.cpp index e8cebcb38f..e9e578d0b7 100644 --- a/lib/Bytecode/Reader/ConstantReader.cpp +++ b/lib/Bytecode/Reader/ConstantReader.cpp @@ -233,12 +233,12 @@ Constant *BytecodeParser::parseConstantValue(const unsigned char *&Buf, case Type::StructTyID: { const StructType *ST = cast(Ty); - const StructType::ElementTypes &ET = ST->getElementTypes(); std::vector Elements; - Elements.reserve(ET.size()); - for (unsigned i = 0; i != ET.size(); ++i) - Elements.push_back(getConstantValue(ET[i], read_vbr_uint(Buf, EndBuf))); + Elements.reserve(ST->getNumElements()); + for (unsigned i = 0; i != ST->getNumElements(); ++i) + Elements.push_back(getConstantValue(ST->getElementType(i), + read_vbr_uint(Buf, EndBuf))); return ConstantStruct::get(ST, Elements); } -- cgit v1.2.3-18-g5258