[llvm-commits] [llvm] r51885 - /llvm/trunk/lib/CodeGen/AsmPrinter.cpp
Scott Michel
scottm at aero.org
Mon Jun 2 15:19:12 PDT 2008
Author: pingbak
Date: Mon Jun 2 17:19:12 2008
New Revision: 51885
URL: http://llvm.org/viewvc/llvm-project?rev=51885&view=rev
Log:
Minor cosmetic patch so that the hex equivalent of a decimal
constant shows up in the assembly language output. Helps with
debugging without a HP calculator having to be handy.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter.cpp?rev=51885&r1=51884&r2=51885&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter.cpp Mon Jun 2 17:19:12 2008
@@ -742,7 +742,9 @@
if (CV->isNullValue() || isa<UndefValue>(CV))
O << "0";
else if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
- O << CI->getZExtValue();
+ O << CI->getZExtValue() << "\t\t\t"
+ << TAI->getCommentString() << " 0x"
+ << CI->getValue().toStringUnsigned(16);
} else if (const GlobalValue *GV = dyn_cast<GlobalValue>(CV)) {
// This is a constant address for a global variable or function. Use the
// name of the variable or function as the address value, possibly
More information about the llvm-commits
mailing list