forked from OSchip/llvm-project
Find a better place to output hex constants corresponding to integers.
llvm-svn: 51904
This commit is contained in:
parent
b788d9bd27
commit
c0e9ff6e52
|
@ -1074,6 +1074,11 @@ void AsmPrinter::EmitGlobalConstant(const Constant *CV, bool Packed) {
|
|||
const Type *type = CV->getType();
|
||||
printDataDirective(type);
|
||||
EmitConstantValueOnly(CV);
|
||||
if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
|
||||
O << "\t\t\t"
|
||||
<< TAI->getCommentString()
|
||||
<< " 0x" << CI->getValue().toStringUnsigned(16);
|
||||
}
|
||||
O << "\n";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue