aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Reader/Reader.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-01-13 00:09:12 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-01-13 00:09:12 +0000
commitb61c1cefb2eade2ef9d6929488b7b097c2dcd0ca (patch)
tree1abc2477571de7707f7a60fe0a8047a393594abc /lib/Bytecode/Reader/Reader.cpp
parentc4d9625b2944e44b3f6b7bd2d91eca1365d26862 (diff)
Get rid of some useless distinction between bool and integer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33166 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Reader/Reader.cpp')
-rw-r--r--lib/Bytecode/Reader/Reader.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp
index b91604acd7..efdb4f17d2 100644
--- a/lib/Bytecode/Reader/Reader.cpp
+++ b/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))