diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-01-13 00:09:12 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-01-13 00:09:12 +0000 |
commit | bea2e4cf23c394ac2465e7ef12e5734100bd3229 (patch) | |
tree | 520fa30a63d5a01a71729606c497485869676018 /llvm/lib/Bytecode/Reader/Reader.cpp | |
parent | ae7e9c5b352dfb84e32b999dc4b451b2f7e4a79a (diff) | |
download | bcm5719-llvm-bea2e4cf23c394ac2465e7ef12e5734100bd3229.tar.gz bcm5719-llvm-bea2e4cf23c394ac2465e7ef12e5734100bd3229.zip |
Get rid of some useless distinction between bool and integer.
llvm-svn: 33166
Diffstat (limited to 'llvm/lib/Bytecode/Reader/Reader.cpp')
-rw-r--r-- | llvm/lib/Bytecode/Reader/Reader.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/llvm/lib/Bytecode/Reader/Reader.cpp b/llvm/lib/Bytecode/Reader/Reader.cpp index b91604acd7b..efdb4f17d26 100644 --- a/llvm/lib/Bytecode/Reader/Reader.cpp +++ b/llvm/lib/Bytecode/Reader/Reader.cpp @@ -1408,17 +1408,10 @@ Value *BytecodeReader::ParseConstantPoolValue(unsigned TypeID) { const IntegerType *IT = cast<IntegerType>(Ty); if (IT->getBitWidth() <= 32) { uint32_t Val = read_vbr_uint(); - if (IT->getBitWidth() == 1) { - if (Val != 0 && Val != 1) - error("Invalid boolean value read."); - Result = ConstantInt::get(Type::Int1Ty, Val == 1); - if (Handler) Handler->handleConstantValue(Result); - } else { - if (!ConstantInt::isValueValidForType(Ty, uint64_t(Val))) - error("Integer value read is invalid for type."); - Result = ConstantInt::get(IT, Val); - if (Handler) Handler->handleConstantValue(Result); - } + if (!ConstantInt::isValueValidForType(Ty, uint64_t(Val))) + error("Integer value read is invalid for type."); + Result = ConstantInt::get(IT, Val); + if (Handler) Handler->handleConstantValue(Result); } else if (IT->getBitWidth() <= 64) { uint64_t Val = read_vbr_uint64(); if (!ConstantInt::isValueValidForType(Ty, Val)) |