[PATCH] D18207: [llvm-objdump] Add '0x' prefix to a target displacement number to accent its hex format
Simon Atanasyan via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 17 03:48:49 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL263705: [llvm-objdump] Add '0x' prefix to a target displacement number to accent its… (authored by atanasyan).
Changed prior to commit:
http://reviews.llvm.org/D18207?vs=50815&id=50921#toc
Repository:
rL LLVM
http://reviews.llvm.org/D18207
Files:
llvm/trunk/test/tools/llvm-objdump/hex-displacement.test
llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
Index: llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
===================================================================
--- llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
+++ llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
@@ -1142,7 +1142,7 @@
outs() << " <" << TargetName;
uint64_t Disp = Target - TargetAddress;
if (Disp)
- outs() << '+' << utohexstr(Disp);
+ outs() << "+0x" << utohexstr(Disp);
outs() << '>';
}
}
Index: llvm/trunk/test/tools/llvm-objdump/hex-displacement.test
===================================================================
--- llvm/trunk/test/tools/llvm-objdump/hex-displacement.test
+++ llvm/trunk/test/tools/llvm-objdump/hex-displacement.test
@@ -0,0 +1,10 @@
+# Check that target displacement has '0x' prefix
+# to accent hex format of the number.
+
+# RUN: llvm-objdump -d %p/Inputs/export.dll.coff-i386 | FileCheck %s
+
+# CHECK: exportfn2:
+# CHECK-NEXT: 10002010: 50 pushl %eax
+# CHECK-NEXT: 10002011: e8 00 00 00 00 calll 0 <exportfn2+0x6>
+# CHECK-NEXT: 10002016: 50 pushl %eax
+# CHECK-NEXT: 10002017: e8 00 00 00 00 calll 0 <exportfn2+0xC>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18207.50921.patch
Type: text/x-patch
Size: 1275 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160317/e99dc046/attachment.bin>
More information about the llvm-commits
mailing list