mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-27 04:18:42 +00:00
Simplify code by using ConstantInt::getRawValue instead of checking to see
whether the constant is signed or unsigned, then casting git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7252 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -324,9 +324,7 @@ void CWriter::printConstantArray(ConstantArray *CPA) {
|
||||
|
||||
// Do not include the last character, which we know is null
|
||||
for (unsigned i = 0, e = CPA->getNumOperands()-1; i != e; ++i) {
|
||||
unsigned char C = (ETy == Type::SByteTy) ?
|
||||
(unsigned char)cast<ConstantSInt>(CPA->getOperand(i))->getValue() :
|
||||
(unsigned char)cast<ConstantUInt>(CPA->getOperand(i))->getValue();
|
||||
unsigned char C = cast<ConstantInt>(CPA->getOperand(i))->getRawValue();
|
||||
|
||||
// Print it out literally if it is a printable character. The only thing
|
||||
// to be careful about is when the last letter output was a hex escape
|
||||
|
||||
Reference in New Issue
Block a user