File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
branches/rxwei-patch-1/stdlib/public/runtime Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -1015,7 +1015,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-08-18-a: b10b1fce14385faa6d44f6b933e95
1015
1015
refs/heads/rdar-43033749-fix-batch-mode-no-diags-swift-5.0-branch: a14e64eaad30de89f0f5f0b2a782eed7ecdcb255
1016
1016
refs/heads/revert-19006-error-bridging-integer-type: 8a9065a3696535305ea53fe9b71f91cbe6702019
1017
1017
refs/heads/revert-19050-revert-19006-error-bridging-integer-type: ecf752d54b05dd0a20f510f0bfa54a3fec3bcaca
1018
- refs/heads/rxwei-patch-1: 354eb4d7292951c34f2ba1e5f87a32e40c4a9f9b
1018
+ refs/heads/rxwei-patch-1: 2f8b5ac9e2f4395f2633b0dfe03b7d6fd1685b7d
1019
1019
refs/heads/shahmishal-patch-1: e58ec0f7488258d42bef51bc3e6d7b3dc74d7b2a
1020
1020
refs/heads/typelist-existential: 4046359efd541fb5c72d69a92eefc0a784df8f5e
1021
1021
refs/tags/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-08-20-a: 4319ba09e4fb8650ee86061075c74a016b6baab9
Original file line number Diff line number Diff line change 31
31
#include " llvm/Support/PointerLikeTypeTraits.h"
32
32
#include < algorithm>
33
33
#include < cctype>
34
+ #include < cinttypes>
34
35
#include < condition_variable>
35
36
#include < new>
36
37
#include < unordered_set>
@@ -3897,10 +3898,15 @@ void _swift_debug_verifyTypeLayoutAttribute(Metadata *type,
3897
3898
size_t size,
3898
3899
const char *description) {
3899
3900
auto presentValue = [&](const void *value) {
3900
- if (size < sizeof (long long )) {
3901
- long long intValue = 0 ;
3902
- memcpy (&intValue, value, size);
3903
- fprintf (stderr, " %lld (%#llx)\n " , intValue, intValue);
3901
+ if (size <= sizeof (uint64_t )) {
3902
+ uint64_t intValue = 0 ;
3903
+ auto ptr = reinterpret_cast <uint8_t *>(&intValue);
3904
+ #if defined(__BIG_ENDIAN__)
3905
+ ptr += sizeof (uint64_t ) - size;
3906
+ #endif
3907
+ memcpy (ptr, value, size);
3908
+ fprintf (stderr, " %" PRIu64 " (%#" PRIx64 " )\n " , intValue, intValue);
3909
+ fprintf (stderr, " " );
3904
3910
}
3905
3911
auto bytes = reinterpret_cast <const uint8_t *>(value);
3906
3912
for (unsigned i = 0 ; i < size; ++i) {
You can’t perform that action at this time.
0 commit comments