1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

Work around a gas bug. Print '-9223372036854775808' as unsigned.

llvm-svn: 11729
This commit is contained in:
Chris Lattner 2004-02-23 03:27:05 +00:00
parent 85f13fae06
commit b200638dc4

View File

@ -144,7 +144,10 @@ void Printer::emitConstantValueOnly(const Constant *CV) {
assert(CB == ConstantBool::True);
O << "1";
} else if (const ConstantSInt *CI = dyn_cast<ConstantSInt>(CV))
O << CI->getValue();
if (((CI->getValue() << 32) >> 32) == CI->getValue())
O << CI->getValue();
else
O << (unsigned long long)CI->getValue();
else if (const ConstantUInt *CI = dyn_cast<ConstantUInt>(CV))
O << CI->getValue();
else if (const ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(CV))