mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-16 11:24:39 +00:00
remove unneeded special case for bool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33156 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -325,12 +325,7 @@ void BytecodeWriter::outputConstant(const Constant *CPV) {
|
|||||||
switch (CPV->getType()->getTypeID()) {
|
switch (CPV->getType()->getTypeID()) {
|
||||||
case Type::IntegerTyID: { // Integer types...
|
case Type::IntegerTyID: { // Integer types...
|
||||||
unsigned NumBits = cast<IntegerType>(CPV->getType())->getBitWidth();
|
unsigned NumBits = cast<IntegerType>(CPV->getType())->getBitWidth();
|
||||||
if (NumBits == 1)
|
if (NumBits <= 32)
|
||||||
if (cast<ConstantInt>(CPV)->getZExtValue())
|
|
||||||
output_vbr(1U);
|
|
||||||
else
|
|
||||||
output_vbr(0U);
|
|
||||||
else if (NumBits <= 32)
|
|
||||||
output_vbr(uint32_t(cast<ConstantInt>(CPV)->getZExtValue()));
|
output_vbr(uint32_t(cast<ConstantInt>(CPV)->getZExtValue()));
|
||||||
else if (NumBits <= 64)
|
else if (NumBits <= 64)
|
||||||
output_vbr(uint64_t(cast<ConstantInt>(CPV)->getZExtValue()));
|
output_vbr(uint64_t(cast<ConstantInt>(CPV)->getZExtValue()));
|
||||||
|
Reference in New Issue
Block a user