@@ -362,22 +362,16 @@ StepResult ComponentStep::take(bool prevFailed) {
362
362
return finalize (/* isSuccess=*/ false );
363
363
}
364
364
365
- #ifdef NDEBUG
366
365
auto printConstraints = [&](const ConstraintList &constraints) {
367
366
for (auto &constraint : constraints)
368
367
constraint.print (getDebugLogger (), &CS.getASTContext ().SourceMgr );
369
368
};
370
- #endif
371
369
372
370
// If we don't have any disjunction or type variable choices left, we're done
373
371
// solving. Make sure we don't have any unsolved constraints left over, using
374
372
// report_fatal_error to make sure we trap in debug builds and fail the step
375
373
// in release builds.
376
374
if (!CS.ActiveConstraints .empty ()) {
377
- #ifndef NDEBUG
378
- CS.print (llvm::errs ());
379
- llvm::report_fatal_error (" Active constraints left over?" );
380
- #else
381
375
if (CS.isDebugMode ()) {
382
376
getDebugLogger () << " (failed due to remaining active constraints:\n " ;
383
377
printConstraints (CS.ActiveConstraints );
@@ -386,15 +380,10 @@ StepResult ComponentStep::take(bool prevFailed) {
386
380
387
381
CS.InvalidState = true ;
388
382
return finalize (/* isSuccess=*/ false );
389
- #endif
390
383
}
391
384
392
385
if (!CS.solverState ->allowsFreeTypeVariables ()) {
393
386
if (!CS.InactiveConstraints .empty ()) {
394
- #ifndef NDEBUG
395
- CS.print (llvm::errs ());
396
- llvm::report_fatal_error (" Inactive constraints left over?" );
397
- #else
398
387
if (CS.isDebugMode ()) {
399
388
getDebugLogger () << " (failed due to remaining inactive constraints:\n " ;
400
389
printConstraints (CS.InactiveConstraints );
@@ -403,7 +392,6 @@ StepResult ComponentStep::take(bool prevFailed) {
403
392
404
393
CS.InvalidState = true ;
405
394
return finalize (/* isSuccess=*/ false );
406
- #endif
407
395
}
408
396
}
409
397
0 commit comments