summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-05-12 15:13:52 +0000
committerChris Lattner <sabre@nondot.org>2003-05-12 15:13:52 +0000
commit09eb76ddfdfd554aa56e8fd9ff59939435c7e7e9 (patch)
treec19727795023bcc70e88677cef1fe7f863e4b9af /llvm/lib/Bytecode
parent250c68dc5c76034148090732f7b0ae0255f9c296 (diff)
downloadbcm5719-llvm-09eb76ddfdfd554aa56e8fd9ff59939435c7e7e9.tar.gz
bcm5719-llvm-09eb76ddfdfd554aa56e8fd9ff59939435c7e7e9.zip
Fix Bug: Assembler/2003-05-12-MinIntProblem.llx
llvm-svn: 6123
Diffstat (limited to 'llvm/lib/Bytecode')
-rw-r--r--llvm/lib/Bytecode/Reader/ConstantReader.cpp12
1 files changed, 3 insertions, 9 deletions
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;
}
OpenPOWER on IntegriCloud