From eefc845b5f407adf1992602aaac1142b2d583220 Mon Sep 17 00:00:00 2001 From: Scott Michel Date: Tue, 3 Jun 2008 15:39:51 +0000 Subject: [PATCH] Find a better place to output hex constants corresponding to integers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51904 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index d225dbce9fe..3265a99c05d 100644 --- a/lib/CodeGen/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter.cpp @@ -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(CV)) { + O << "\t\t\t" + << TAI->getCommentString() + << " 0x" << CI->getValue().toStringUnsigned(16); + } O << "\n"; } -- 2.34.1