projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8c63f0
)
Find a better place to output hex constants corresponding to integers.
author
Scott Michel
<scottm@aero.org>
Tue, 3 Jun 2008 15:39:51 +0000
(15:39 +0000)
committer
Scott Michel
<scottm@aero.org>
Tue, 3 Jun 2008 15:39:51 +0000
(15:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51904
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/AsmPrinter.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/AsmPrinter.cpp
b/lib/CodeGen/AsmPrinter.cpp
index d225dbce9fed93002fde82f69d66916f81ac9d1a..3265a99c05d28a557ae3d88860837f7aefb3fde4 100644
(file)
--- 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<ConstantInt>(CV)) {
+ O << "\t\t\t"
+ << TAI->getCommentString()
+ << " 0x" << CI->getValue().toStringUnsigned(16);
+ }
O << "\n";
}