From 09eb76ddfdfd554aa56e8fd9ff59939435c7e7e9 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 12 May 2003 15:13:52 +0000 Subject: Fix Bug: Assembler/2003-05-12-MinIntProblem.llx llvm-svn: 6123 --- llvm/lib/Bytecode/Reader/ConstantReader.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'llvm/lib/Bytecode') diff --git a/llvm/lib/Bytecode/Reader/ConstantReader.cpp b/llvm/lib/Bytecode/Reader/ConstantReader.cpp index d1c8644ddd4..0ad38b4025f 100644 --- a/llvm/lib/Bytecode/Reader/ConstantReader.cpp +++ b/llvm/lib/Bytecode/Reader/ConstantReader.cpp @@ -245,19 +245,13 @@ bool BytecodeParser::parseConstantValue(const uchar *&Buf, const uchar *EndBuf, break; } - case Type::SByteTyID: // Unsigned integer types... + case Type::SByteTyID: // Signed integer types... case Type::ShortTyID: case Type::IntTyID: { - int Val; - if (read_vbr(Buf, EndBuf, Val)) return true; - if (!ConstantSInt::isValueValidForType(Ty, Val)) return true; - V = ConstantSInt::get(Ty, Val); - break; - } - - case Type::LongTyID: { + case Type::LongTyID: int64_t Val; if (read_vbr(Buf, EndBuf, Val)) return true; + if (!ConstantSInt::isValueValidForType(Ty, Val)) return true; V = ConstantSInt::get(Ty, Val); break; } -- cgit v1.2.3