@@ -302,8 +302,8 @@ static bool makeStringGutsSummary(
302
302
303
303
uint8_t discriminator = raw1 >> 56 ;
304
304
305
- if ((discriminator & 0xB0 ) == 0xA0 ) { // 1x10xxxx: Small string
306
- uint64_t count = (raw1 >> 56 ) & 0x0F ;
305
+ if ((discriminator & 0b1011'0000 ) == 0b1010'0000 ) { // 1x10xxxx: Small string
306
+ uint64_t count = (raw1 >> 56 ) & 0b1111 ;
307
307
uint64_t maxCount = (ptrSize == 8 ? 15 : 10 );
308
308
if (count > maxCount)
309
309
return false ;
@@ -328,7 +328,7 @@ static bool makeStringGutsSummary(
328
328
lldb::addr_t objectAddress = (raw1 & 0x0FFFFFFFFFFFFFFF );
329
329
if ((flags & 0x1000 ) != 0 ) { // Tail-allocated / biased address
330
330
// Tail-allocation is only for natively stored or literals.
331
- if ((discriminator & 0x70 ) != 0 )
331
+ if ((discriminator & 0b0111'0000 ) != 0 )
332
332
return false ;
333
333
uint64_t bias = (ptrSize == 8 ? 32 : 20 );
334
334
auto address = objectAddress + bias;
@@ -337,7 +337,7 @@ static bool makeStringGutsSummary(
337
337
address, count, valobj, stream, summary_options, read_options);
338
338
}
339
339
340
- if ((discriminator & 0xF0 ) == 0x00 ) { // Shared string
340
+ if ((discriminator & 0b1111'0000 ) == 0 ) { // Shared string
341
341
// FIXME: Verify that there is a __SharedStringStorage instance at `address`.
342
342
// Shared strings must not be tail-allocated or natively stored.
343
343
if ((flags & 0x3000 ) != 0 )
@@ -354,10 +354,10 @@ static bool makeStringGutsSummary(
354
354
}
355
355
356
356
// Native/shared strings should already have been handled.
357
- if ((discriminator & 0x70 ) == 0 )
357
+ if ((discriminator & 0b0111'0000 ) == 0 )
358
358
return false ;
359
359
360
- if ((discriminator & 0xE0 ) == 0x40 ) { // 010xxxxx: Bridged
360
+ if ((discriminator & 0b1110'0000 ) == 0b0100'0000 ) { // 010xxxxx: Bridged
361
361
TypeSystemClangSP clang_ts_sp =
362
362
ScratchTypeSystemClang::GetForTarget (process->GetTarget ());
363
363
if (!clang_ts_sp)
@@ -376,7 +376,7 @@ static bool makeStringGutsSummary(
376
376
return NSStringSummaryProvider(*nsstring.get (), stream, summary_options);
377
377
}
378
378
379
- if ((discriminator & 0xF8 ) == 0x18 ) { // 0001xxxx: Foreign
379
+ if ((discriminator & 0b1111'1000 ) == 0b0001'1000 ) { // 0001xxxx: Foreign
380
380
// Not currently generated: Foreign non-bridged strings are not currently
381
381
// used in Swift.
382
382
return false ;
0 commit comments