diff options
author | Scott Michel <scottm@aero.org> | 2008-06-03 15:39:51 +0000 |
---|---|---|
committer | Scott Michel <scottm@aero.org> | 2008-06-03 15:39:51 +0000 |
commit | c0e9ff6e52beceb0affab6011363def6cb3bb5f0 (patch) | |
tree | 13e516c4241e221d480d23cf3decf441e9eb09cf /llvm/lib/CodeGen/AsmPrinter.cpp | |
parent | b788d9bd277d8e8c829cd5a53fedb934fdb0ae48 (diff) | |
download | bcm5719-llvm-c0e9ff6e52beceb0affab6011363def6cb3bb5f0.tar.gz bcm5719-llvm-c0e9ff6e52beceb0affab6011363def6cb3bb5f0.zip |
Find a better place to output hex constants corresponding to integers.
llvm-svn: 51904
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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<ConstantInt>(CV)) { + O << "\t\t\t" + << TAI->getCommentString() + << " 0x" << CI->getValue().toStringUnsigned(16); + } O << "\n"; } |