[llvm-commits] [llvm] r51904 - /llvm/trunk/lib/CodeGen/AsmPrinter.cpp
Scott Michel
scottm at aero.org
Tue Jun 3 08:39:51 PDT 2008
Author: pingbak
Date: Tue Jun 3 10:39:51 2008
New Revision: 51904
URL: http://llvm.org/viewvc/llvm-project?rev=51904&view=rev
Log:
Find a better place to output hex constants corresponding to integers.
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=51904&r1=51903&r2=51904&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter.cpp Tue Jun 3 10:39:51 2008
@@ -1074,6 +1074,11 @@
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";
}
More information about the llvm-commits
mailing list