File tree Expand file tree Collapse file tree 1 file changed +4
-16
lines changed Expand file tree Collapse file tree 1 file changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -5944,25 +5944,13 @@ EnumCaseDecl *EnumCaseDecl::create(SourceLoc CaseLoc,
5944
5944
}
5945
5945
5946
5946
bool EnumDecl::hasPotentiallyUnavailableCaseValue () const {
5947
- switch (static_cast <AssociatedValueCheck>(Bits.EnumDecl .HasAssociatedValues )) {
5948
- case AssociatedValueCheck::Unchecked:
5949
- this ->hasOnlyCasesWithoutAssociatedValues ();
5950
- LLVM_FALLTHROUGH;
5951
- default :
5952
- return static_cast <bool >(Bits.EnumDecl .HasAnyUnavailableValues );
5953
- }
5947
+ (void )this ->hasOnlyCasesWithoutAssociatedValues (); // Prime the cache
5948
+ return static_cast <bool >(Bits.EnumDecl .HasAnyUnavailableValues );
5954
5949
}
5955
5950
5956
5951
bool EnumDecl::hasCasesUnavailableDuringLowering () const {
5957
- switch (
5958
- static_cast <AssociatedValueCheck>(Bits.EnumDecl .HasAssociatedValues )) {
5959
- case AssociatedValueCheck::Unchecked:
5960
- this ->hasOnlyCasesWithoutAssociatedValues ();
5961
- LLVM_FALLTHROUGH;
5962
- default :
5963
- return static_cast <bool >(
5964
- Bits.EnumDecl .HasAnyUnavailableDuringLoweringValues );
5965
- }
5952
+ (void )this ->hasOnlyCasesWithoutAssociatedValues (); // Prime the cache
5953
+ return static_cast <bool >(Bits.EnumDecl .HasAnyUnavailableDuringLoweringValues );
5966
5954
}
5967
5955
5968
5956
bool EnumDecl::hasOnlyCasesWithoutAssociatedValues () const {
You can’t perform that action at this time.
0 commit comments