values regardless of the signedness of the constant's type, it is okay to
always make the AsmWriter.cpp print constant ints as signed values. The
AsmParser will automatically handle things like: uint -1 as a result.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32686
91177308-0d34-0410-b5e6-
96231b3b80d8
if (const ConstantBool *CB = dyn_cast<ConstantBool>(CV)) {
Out << (CB->getValue() ? "true" : "false");
} else if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
- if (CI->getType()->isSigned())
- Out << CI->getSExtValue();
- else
- Out << CI->getZExtValue();
+ Out << CI->getSExtValue();
} else if (const ConstantFP *CFP = dyn_cast<ConstantFP>(CV)) {
// We would like to output the FP constant value in exponential notation,
// but we cannot do this if doing so will lose precision. Check here to