diff options
author | Chris Lattner <sabre@nondot.org> | 2001-12-14 16:30:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-12-14 16:30:51 +0000 |
commit | b2b1b3d0360d702ebacbc6677d05853453f2de2b (patch) | |
tree | efcba19c050ea4641d27e4b6469644f5c9813d89 /llvm/lib/Bytecode/Reader/ConstantReader.cpp | |
parent | f4ba3304162357f4fa260330d230ea3962eb72e8 (diff) | |
download | bcm5719-llvm-b2b1b3d0360d702ebacbc6677d05853453f2de2b.tar.gz bcm5719-llvm-b2b1b3d0360d702ebacbc6677d05853453f2de2b.zip |
Remove unsized array support
llvm-svn: 1461
Diffstat (limited to 'llvm/lib/Bytecode/Reader/ConstantReader.cpp')
-rw-r--r-- | llvm/lib/Bytecode/Reader/ConstantReader.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/Bytecode/Reader/ConstantReader.cpp b/llvm/lib/Bytecode/Reader/ConstantReader.cpp index 671afd2066e..78da567f012 100644 --- a/llvm/lib/Bytecode/Reader/ConstantReader.cpp +++ b/llvm/lib/Bytecode/Reader/ConstantReader.cpp @@ -55,7 +55,7 @@ const Type *BytecodeParser::parseTypeConstant(const uchar *&Buf, const Type *ElementType = getType(ElTyp); if (ElementType == 0) return failure(Val); - int NumElements; + unsigned NumElements; if (read_vbr(Buf, EndBuf, NumElements)) return failure(Val); BCR_TRACE(5, "Array Type Constant #" << ElTyp << " size=" @@ -239,11 +239,7 @@ bool BytecodeParser::parseConstantValue(const uchar *&Buf, const uchar *EndBuf, case Type::ArrayTyID: { const ArrayType *AT = cast<const ArrayType>(Ty); - unsigned NumElements; - if (AT->isSized()) // Sized array, # elements stored in type! - NumElements = (unsigned)AT->getNumElements(); - else // Unsized array, # elements stored in stream! - if (read_vbr(Buf, EndBuf, NumElements)) return failure(true); + unsigned NumElements = AT->getNumElements(); vector<Constant*> Elements; while (NumElements--) { // Read all of the elements of the constant. @@ -320,6 +316,7 @@ bool BytecodeParser::parseConstantValue(const uchar *&Buf, const uchar *EndBuf, break; } default: + BCR_TRACE(5, "UNKNOWN Pointer Constant Type!\n"); return failure(true); } break; |