Skip to content

Commit 01a3a78

Browse files
committed
more build failures
1 parent 506f717 commit 01a3a78

File tree

1 file changed

+1
-58
lines changed

1 file changed

+1
-58
lines changed

clang/lib/Sema/SemaConcept.cpp

Lines changed: 1 addition & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -700,76 +700,20 @@ ExprResult CalculateConstraintSatisfaction::Calculate(
700700
HashParameterMapping(S, MLTAL, ID, OuterPackSubstIndex)
701701
.VisitConstraint(Constraint);
702702

703-
unsigned CacheKeyHash = ID.computeStableHash();
704-
705-
#define UseCache 1
706703
if (auto Iter = S.ConceptIdSatisfactionCache.find(ID);
707704
Iter != S.ConceptIdSatisfactionCache.end()) {
708-
#if UseCache
705+
709706
auto &Cached = Iter->second.Satisfaction;
710707
Satisfaction.ContainsErrors = Cached.ContainsErrors;
711708
Satisfaction.IsSatisfied = Cached.IsSatisfied;
712709
Satisfaction.Details.insert(Satisfaction.Details.begin() + Size,
713710
Cached.Details.begin(), Cached.Details.end());
714-
#ifndef NDEBUG
715-
if (Iter->second.E != Constraint.getConstraintExpr()) {
716-
llvm::errs() << "CacheKey: " << CacheKeyHash << " "
717-
<< S.ConceptIdSatisfactionCache.size() << "\n";
718-
if (Constraint.hasParameterMapping()) {
719-
llvm::errs() << "Mapping: ";
720-
for (auto Arg : Constraint.getParameterMapping()) {
721-
Arg.getArgument().print(S.getPrintingPolicy(), llvm::errs(),
722-
/*IncludeType=*/false);
723-
llvm::errs() << " ";
724-
}
725-
llvm::errs() << "\n";
726-
}
727-
llvm::errs() << "Previous 1: " << Iter->second.E << " ";
728-
Iter->second.E->printPretty(llvm::errs(), /*Helper=*/nullptr,
729-
S.getPrintingPolicy());
730-
llvm::errs() << "\n";
731-
llvm::errs() << "Current 1: " << Constraint.getConstraintExpr() << " ";
732-
Constraint.getConstraintExpr()->printPretty(
733-
llvm::errs(), /*Helper=*/nullptr, S.getPrintingPolicy());
734-
llvm::errs() << "\n";
735-
}
736-
assert(Iter->second.E == Constraint.getConstraintExpr());
737-
#ifndef NDEBUG
738-
return Iter->second.SubstExpr;
739-
#else
740-
#endif
741711
}
742712

743713
ExprResult E = CalculateSlow(Constraint, MLTAL);
744714

745715
assert(Constraint.getConstraintExpr() == Previous);
746716

747-
if (auto Iter = S.ConceptIdSatisfactionCache.find(ID);
748-
Iter != S.ConceptIdSatisfactionCache.end()) {
749-
#if UseCache
750-
auto &Cached = Iter->second.Satisfaction;
751-
Satisfaction.ContainsErrors = Cached.ContainsErrors;
752-
Satisfaction.IsSatisfied = Cached.IsSatisfied;
753-
Satisfaction.Details.insert(Satisfaction.Details.begin() + Size,
754-
Cached.Details.begin(), Cached.Details.end());
755-
#ifndef NDEBUG
756-
if (Iter->second.E != Constraint.getConstraintExpr()) {
757-
llvm::errs() << "CacheKey: " << CacheKeyHash << " ";
758-
llvm::errs() << "Previous: ";
759-
Iter->second.E->printPretty(llvm::errs(), /*Helper=*/nullptr,
760-
S.getPrintingPolicy());
761-
llvm::errs() << "\n";
762-
llvm::errs() << "Current: ";
763-
Constraint.getConstraintExpr()->printPretty(
764-
llvm::errs(), /*Helper=*/nullptr, S.getPrintingPolicy());
765-
llvm::errs() << "\n";
766-
}
767-
assert(Iter->second.E == Constraint.getConstraintExpr());
768-
#ifndef NDEBUG
769-
return Iter->second.SubstExpr;
770-
#endif
771-
}
772-
773717
CachedConceptIdConstraint Cache;
774718
Cache.Satisfaction.ContainsErrors = Satisfaction.ContainsErrors;
775719
Cache.Satisfaction.IsSatisfied = Satisfaction.IsSatisfied;
@@ -778,7 +722,6 @@ ExprResult CalculateConstraintSatisfaction::Calculate(
778722
Cache.SubstExpr = E;
779723
Cache.E = Constraint.getConstraintExpr();
780724
S.ConceptIdSatisfactionCache.insert({ID, std::move(Cache)});
781-
#undef UseCache
782725

783726
return E;
784727
}

0 commit comments

Comments
 (0)