File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -433,10 +433,13 @@ class RefCountBitsT {
433
433
}
434
434
435
435
LLVM_ATTRIBUTE_ALWAYS_INLINE
436
- RefCountBitsT (RefCountBitsT<RefCountIsInline> newbits ) {
436
+ RefCountBitsT (const RefCountBitsT<RefCountIsInline> *newbitsPtr ) {
437
437
bits = 0 ;
438
+
439
+ assert (newbitsPtr && " expected non null newbits" );
440
+ RefCountBitsT<RefCountIsInline> newbits = *newbitsPtr;
438
441
439
- if (refcountIsInline || sizeof (newbits) == sizeof (*this )) {
442
+ if (refcountIsInline || sizeof (newbits) == sizeof (*this )) {
440
443
// this and newbits are both inline
441
444
// OR this is out-of-line but the same layout as inline.
442
445
// (FIXME: use something cleaner than sizeof for same-layout test)
@@ -672,7 +675,7 @@ class SideTableRefCountBits : public RefCountBitsT<RefCountNotInline>
672
675
673
676
LLVM_ATTRIBUTE_ALWAYS_INLINE
674
677
SideTableRefCountBits (InlineRefCountBits newbits)
675
- : RefCountBitsT<RefCountNotInline>(newbits), weakBits(1 )
678
+ : RefCountBitsT<RefCountNotInline>(& newbits), weakBits(1 )
676
679
{ }
677
680
678
681
You can’t perform that action at this time.
0 commit comments