mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-04 06:09:05 +00:00
Fix bug: CWriter/2003-05-12-IntegerSizeWarning.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6128 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4dbaba4999
commit
45343ea5ac
@ -380,8 +380,14 @@ void CWriter::printConstant(Constant *CPV) {
|
||||
Out << (CPV == ConstantBool::False ? "0" : "1"); break;
|
||||
case Type::SByteTyID:
|
||||
case Type::ShortTyID:
|
||||
case Type::IntTyID:
|
||||
Out << cast<ConstantSInt>(CPV)->getValue(); break;
|
||||
case Type::IntTyID:
|
||||
if ((int)cast<ConstantSInt>(CPV)->getValue() == (int)0x80000000)
|
||||
Out << "((int)0x80000000)"; // Handle MININT specially to avoid warning
|
||||
else
|
||||
Out << cast<ConstantSInt>(CPV)->getValue();
|
||||
break;
|
||||
|
||||
case Type::LongTyID:
|
||||
Out << cast<ConstantSInt>(CPV)->getValue() << "ll"; break;
|
||||
|
||||
|
@ -380,8 +380,14 @@ void CWriter::printConstant(Constant *CPV) {
|
||||
Out << (CPV == ConstantBool::False ? "0" : "1"); break;
|
||||
case Type::SByteTyID:
|
||||
case Type::ShortTyID:
|
||||
case Type::IntTyID:
|
||||
Out << cast<ConstantSInt>(CPV)->getValue(); break;
|
||||
case Type::IntTyID:
|
||||
if ((int)cast<ConstantSInt>(CPV)->getValue() == (int)0x80000000)
|
||||
Out << "((int)0x80000000)"; // Handle MININT specially to avoid warning
|
||||
else
|
||||
Out << cast<ConstantSInt>(CPV)->getValue();
|
||||
break;
|
||||
|
||||
case Type::LongTyID:
|
||||
Out << cast<ConstantSInt>(CPV)->getValue() << "ll"; break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user