From c0e9ff6e52beceb0affab6011363def6cb3bb5f0 Mon Sep 17 00:00:00 2001 From: Scott Michel Date: Tue, 3 Jun 2008 15:39:51 +0000 Subject: Find a better place to output hex constants corresponding to integers. llvm-svn: 51904 --- llvm/lib/CodeGen/AsmPrinter.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'llvm/lib/CodeGen/AsmPrinter.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp index d225dbce9fe..3265a99c05d 100644 --- a/llvm/lib/CodeGen/AsmPrinter.cpp +++ b/llvm/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"; } -- cgit v1.2.3