File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,8 @@ Pointer::~Pointer() {
63
63
}
64
64
65
65
void Pointer::operator =(const Pointer &P) {
66
-
67
66
if (!this ->isIntegralPointer () || !P.isBlockPointer ())
68
- assert (P.StorageKind == StorageKind);
67
+ assert (P.StorageKind == StorageKind || ( this -> isZero () && P. isZero ()) );
69
68
70
69
bool WasBlockPointer = isBlockPointer ();
71
70
StorageKind = P.StorageKind ;
@@ -92,7 +91,7 @@ void Pointer::operator=(const Pointer &P) {
92
91
93
92
void Pointer::operator =(Pointer &&P) {
94
93
if (!this ->isIntegralPointer () || !P.isBlockPointer ())
95
- assert (P.StorageKind == StorageKind);
94
+ assert (P.StorageKind == StorageKind || ( this -> isZero () && P. isZero ()) );
96
95
97
96
bool WasBlockPointer = isBlockPointer ();
98
97
StorageKind = P.StorageKind ;
You can’t perform that action at this time.
0 commit comments