@@ -1136,12 +1136,12 @@ void PointerVariableConstraint::constrainOuterTo(Constraints &CS, ConstAtom *C,
1136
1136
if (*CA < *C) {
1137
1137
llvm::errs () << " Warning: " << CA->getStr () << " not less than "
1138
1138
<< C->getStr () << " \n " ;
1139
- assert (CA == CS.getWild ()); // definitely bogus if not
1139
+ // assert(CA == CS.getWild()); // definitely bogus if not
1140
1140
}
1141
1141
} else if (*C < *CA) {
1142
1142
llvm::errs () << " Warning: " << C->getStr () << " not less than "
1143
1143
<< CA->getStr () << " \n " ;
1144
- assert (CA == CS.getWild ()); // definitely bogus if not
1144
+ // assert(CA == CS.getWild()); // definitely bogus if not
1145
1145
}
1146
1146
}
1147
1147
}
@@ -1457,27 +1457,31 @@ static void createAtomGeq(Constraints &CS, Atom *L, Atom *R, std::string &Rsn,
1457
1457
VAL = clang::dyn_cast<VarAtom>(L);
1458
1458
VAR = clang::dyn_cast<VarAtom>(R);
1459
1459
1460
- // Check constant atom relationships hold
1461
1460
if (CAR != nullptr && CAL != nullptr ) {
1462
- if (DoEqType) { // check equality, no matter the atom
1463
- assert (*CAR == *CAL && " Invalid: RHS ConstAtom != LHS ConstAtom" );
1464
- } else {
1465
- if (CAL != Wild && CAR != Wild) { // pType atom, disregard CAct
1466
- assert (!(*CAL < *CAR) && " Invalid: LHS ConstAtom < RHS ConstAtom" );
1467
- } else { // checked atom (Wild/Ptr); respect CAct
1468
- switch (CAct) {
1469
- case Same_to_Same:
1470
- assert (*CAR == *CAL && " Invalid: RHS ConstAtom != LHS ConstAtom" );
1471
- break ;
1472
- case Safe_to_Wild:
1473
- assert (!(*CAL < *CAR) && " LHS ConstAtom < RHS ConstAtom" );
1474
- break ;
1475
- case Wild_to_Safe:
1476
- assert (!(*CAR < *CAL) && " RHS ConstAtom < LHS ConstAtom" );
1477
- break ;
1478
- }
1479
- }
1480
- }
1461
+ // These checks were used to verify that the relationships between constant
1462
+ // atom were valid. While we do not generally intend to rewrite code in a
1463
+ // way that violates these relationships, it is possible for a user of 3C
1464
+ // to manually modify their code so that it does while still having valid
1465
+ // CheckedC code.
1466
+ // if (DoEqType) { // check equality, no matter the atom
1467
+ // assert(*CAR == *CAL && "Invalid: RHS ConstAtom != LHS ConstAtom");
1468
+ // } else {
1469
+ // if (CAL != Wild && CAR != Wild) { // pType atom, disregard CAct
1470
+ // assert(!(*CAL < *CAR) && "Invalid: LHS ConstAtom < RHS ConstAtom");
1471
+ // } else { // checked atom (Wild/Ptr); respect CAct
1472
+ // switch (CAct) {
1473
+ // case Same_to_Same:
1474
+ // assert(*CAR == *CAL && "Invalid: RHS ConstAtom != LHS ConstAtom");
1475
+ // break;
1476
+ // case Safe_to_Wild:
1477
+ // assert(!(*CAL < *CAR) && "LHS ConstAtom < RHS ConstAtom");
1478
+ // break;
1479
+ // case Wild_to_Safe:
1480
+ // assert(!(*CAR < *CAL) && "RHS ConstAtom < LHS ConstAtom");
1481
+ // break;
1482
+ // }
1483
+ // }
1484
+ // }
1481
1485
} else if (VAL != nullptr && VAR != nullptr ) {
1482
1486
switch (CAct) {
1483
1487
case Same_to_Same:
0 commit comments