@@ -1959,42 +1959,34 @@ bool GatherUniqueStorageUses::visitUse(Operand *use, AccessUseType useTy) {
1959
1959
case SILArgumentConvention::Indirect_Inout:
1960
1960
case SILArgumentConvention::Indirect_InoutAliasable:
1961
1961
case SILArgumentConvention::Indirect_Out:
1962
- visitor.visitStore (use);
1963
- break ;
1962
+ return visitor.visitStore (use);
1964
1963
case SILArgumentConvention::Indirect_In_Guaranteed:
1965
1964
case SILArgumentConvention::Indirect_In:
1966
1965
case SILArgumentConvention::Indirect_In_Constant:
1967
- visitor.visitLoad (use);
1968
- break ;
1966
+ return visitor.visitLoad (use);
1969
1967
case SILArgumentConvention::Direct_Unowned:
1970
1968
case SILArgumentConvention::Direct_Owned:
1971
1969
case SILArgumentConvention::Direct_Guaranteed:
1972
1970
// most likely an escape of a box
1973
- visitor.visitUnknownUse (use);
1974
- break ;
1971
+ return visitor.visitUnknownUse (use);
1975
1972
}
1976
- return true ;
1977
1973
}
1978
1974
switch (user->getKind ()) {
1979
1975
case SILInstructionKind::DestroyAddrInst:
1980
1976
case SILInstructionKind::DestroyValueInst:
1981
1977
if (useTy == AccessUseType::Exact) {
1982
- visitor.visitDestroy (use);
1983
- return true ;
1978
+ return visitor.visitDestroy (use);
1984
1979
}
1985
- visitor.visitUnknownUse (use);
1986
- return true ;
1980
+ return visitor.visitUnknownUse (use);
1987
1981
1988
1982
case SILInstructionKind::DebugValueInst:
1989
- visitor.visitDebugUse (use);
1990
- return true ;
1983
+ return visitor.visitDebugUse (use);
1991
1984
1992
1985
case SILInstructionKind::LoadInst:
1993
1986
case SILInstructionKind::LoadWeakInst:
1994
1987
case SILInstructionKind::LoadUnownedInst:
1995
1988
case SILInstructionKind::ExistentialMetatypeInst:
1996
- visitor.visitLoad (use);
1997
- return true ;
1989
+ return visitor.visitLoad (use);
1998
1990
1999
1991
case SILInstructionKind::StoreInst:
2000
1992
case SILInstructionKind::StoreWeakInst:
@@ -2006,27 +1998,22 @@ bool GatherUniqueStorageUses::visitUse(Operand *use, AccessUseType useTy) {
2006
1998
break ;
2007
1999
2008
2000
case SILInstructionKind::InjectEnumAddrInst:
2009
- visitor.visitStore (use);
2010
- return true ;
2001
+ return visitor.visitStore (use);
2011
2002
2012
2003
case SILInstructionKind::CopyAddrInst:
2013
2004
if (operIdx == CopyLikeInstruction::Dest) {
2014
- visitor.visitStore (use);
2015
- return true ;
2005
+ return visitor.visitStore (use);
2016
2006
}
2017
2007
assert (operIdx == CopyLikeInstruction::Src);
2018
- visitor.visitLoad (use);
2019
- return true ;
2008
+ return visitor.visitLoad (use);
2020
2009
2021
2010
case SILInstructionKind::DeallocStackInst:
2022
- visitor.visitDealloc (use);
2023
- return true ;
2011
+ return visitor.visitDealloc (use);
2024
2012
2025
2013
default :
2026
2014
break ;
2027
2015
}
2028
- visitor.visitUnknownUse (use);
2029
- return true ;
2016
+ return visitor.visitUnknownUse (use);
2030
2017
}
2031
2018
2032
2019
// ===----------------------------------------------------------------------===//
0 commit comments