diff options
author | Mohit K. Bhakkad <mohit.bhakkad@gmail.com> | 2016-02-26 06:44:10 +0000 |
---|---|---|
committer | Mohit K. Bhakkad <mohit.bhakkad@gmail.com> | 2016-02-26 06:44:10 +0000 |
commit | b18414ab1d5c453fa810dd1572cdc80e46589ef8 (patch) | |
tree | ea97fe0e949a8234bbbdd2f2409681ecaf225c20 /lib/msan | |
parent | 6dfeef05e82f0b683be21d8ae49e92881efcad2f (diff) |
[MSan] Endianness should not matter while printing a byte
Reviewers: eugenis
Subscribers: jaydeep, sagar, llvm-commits
Differential Revision: http://reviews.llvm.org/D17264
Differential Revision: http://reviews.llvm.org/D17563
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@261982 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan')
-rw-r--r-- | lib/msan/msan.cc | 7 | ||||
-rw-r--r-- | lib/msan/msan_report.cc | 4 |
2 files changed, 1 insertions, 10 deletions
diff --git a/lib/msan/msan.cc b/lib/msan/msan.cc index 120abbeb9..ad4491a8d 100644 --- a/lib/msan/msan.cc +++ b/lib/msan/msan.cc @@ -462,13 +462,8 @@ void __msan_dump_shadow(const void *x, uptr size) { } unsigned char *s = (unsigned char*)MEM_TO_SHADOW(x); - for (uptr i = 0; i < size; i++) { -#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ - Printf("%x%x ", s[i] & 0xf, s[i] >> 4); -#else + for (uptr i = 0; i < size; i++) Printf("%x%x ", s[i] >> 4, s[i] & 0xf); -#endif - } Printf("\n"); } diff --git a/lib/msan/msan_report.cc b/lib/msan/msan_report.cc index ddb807028..9a35c9c13 100644 --- a/lib/msan/msan_report.cc +++ b/lib/msan/msan_report.cc @@ -221,11 +221,7 @@ void DescribeMemoryRange(const void *x, uptr size) { } else { unsigned char v = *(unsigned char *)s; if (v) last_quad_poisoned = true; -#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ - Printf("%x%x", v & 0xf, v >> 4); -#else Printf("%x%x", v >> 4, v & 0xf); -#endif } // Group end. if (pos % 4 == 3 && with_origins) { |