File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -4031,8 +4031,6 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
4031
4031
auto mappedTy = F.mapTypeIntoContext (ty);
4032
4032
SILArgument *bbarg = *argI;
4033
4033
++argI;
4034
- auto ownershipkind = ValueOwnershipKind (
4035
- M, mappedTy, fnConv.getSILArgumentConvention (bbarg->getIndex ()));
4036
4034
if (bbarg->getType () != mappedTy) {
4037
4035
llvm::errs () << what << " type mismatch!\n " ;
4038
4036
llvm::errs () << " argument: " ; bbarg->dump ();
@@ -4045,6 +4043,9 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
4045
4043
return ;
4046
4044
}
4047
4045
4046
+ auto ownershipkind = ValueOwnershipKind (
4047
+ M, mappedTy, fnConv.getSILArgumentConvention (bbarg->getIndex ()));
4048
+
4048
4049
if (bbarg->getOwnershipKind () != ownershipkind) {
4049
4050
llvm::errs () << what << " ownership kind mismatch!\n " ;
4050
4051
llvm::errs () << " argument: " << bbarg->getOwnershipKind () << ' \n ' ;
Original file line number Diff line number Diff line change @@ -2887,7 +2887,9 @@ swift::analyzeStaticInitializer(SILValue V,
2887
2887
return false ;
2888
2888
}
2889
2889
return true ;
2890
- } else if (auto *TI = dyn_cast<TupleInst>(V)) {
2890
+ }
2891
+
2892
+ if (auto *TI = dyn_cast<TupleInst>(V)) {
2891
2893
// If it is not a tuple which is a simple type, bail.
2892
2894
if (!isSimpleType (TI->getType (), TI->getModule ()))
2893
2895
return false ;
@@ -2898,7 +2900,9 @@ swift::analyzeStaticInitializer(SILValue V,
2898
2900
return false ;
2899
2901
}
2900
2902
return true ;
2901
- } else if (auto *bi = dyn_cast<BuiltinInst>(V)) {
2903
+ }
2904
+
2905
+ if (auto *bi = dyn_cast<BuiltinInst>(V)) {
2902
2906
switch (bi->getBuiltinInfo ().ID ) {
2903
2907
case BuiltinValueKind::FPTrunc:
2904
2908
if (auto *LI = dyn_cast<LiteralInst>(bi->getArguments ()[0 ])) {
@@ -2908,13 +2912,15 @@ swift::analyzeStaticInitializer(SILValue V,
2908
2912
default :
2909
2913
return false ;
2910
2914
}
2911
- } else if (isa<IntegerLiteralInst>(V)
2912
- || isa<FloatLiteralInst>(V)
2913
- || isa<StringLiteralInst>(V)) {
2915
+ }
2916
+
2917
+ if (isa<IntegerLiteralInst>(V)
2918
+ || isa<FloatLiteralInst>(V)
2919
+ || isa<StringLiteralInst>(V)) {
2914
2920
return true ;
2915
- } else {
2916
- return false ;
2917
2921
}
2922
+
2923
+ return false ;
2918
2924
}
2919
2925
2920
2926
// / Replace load sequence which may contain
You can’t perform that action at this time.
0 commit comments