Skip to content

Commit 64d2cfb

Browse files
committed
Add -sil-verify-all to tests. Removed unused convenience func
1 parent 005d1ba commit 64d2cfb

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

include/swift/SIL/SILLinkage.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -278,14 +278,6 @@ inline bool isPossiblyUsedExternally(SILLinkage linkage, bool wholeModule) {
278278
llvm_unreachable("Unhandled SILLinkage in switch.");
279279
}
280280

281-
inline bool isPublicOrPackage(SILLinkage linkage, int mode = 0) {
282-
if (mode == 1) // non abi
283-
return linkage == SILLinkage::PublicNonABI || linkage == SILLinkage::PackageNonABI;
284-
if (mode == 2) // external
285-
return linkage == SILLinkage::PublicExternal || linkage == SILLinkage::PackageExternal;
286-
return linkage == SILLinkage::Public || linkage == SILLinkage::Package;
287-
}
288-
289281
SILLinkage getDeclSILLinkage(const ValueDecl *decl);
290282

291283
inline bool hasPublicVisibility(SILLinkage linkage) {

test/SILGen/package_sil_linkage.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
// RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t -swift-version 5 -package-name mypkg -verify
1212

1313
/// Check serialization in SILGEN with resilience enabled.
14-
// RUN: %target-swift-emit-silgen -emit-verbose-sil -enable-library-evolution -module-name Utils %t/Utils.swift -package-name mypkg -I %t > %t/Utils-Res.sil
14+
// RUN: %target-swift-emit-silgen -emit-verbose-sil -sil-verify-all -enable-library-evolution -module-name Utils %t/Utils.swift -package-name mypkg -I %t > %t/Utils-Res.sil
1515
// RUN: %FileCheck %s --check-prefixes=UTILS-RES,UTILS-COMMON < %t/Utils-Res.sil
1616

1717
/// Check for indirect access with a resiliently built module dependency.
18-
// RUN: %target-swift-emit-silgen %t/Client.swift -package-name mypkg -I %t > %t/Client-Res.sil
18+
// RUN: %target-swift-emit-silgen -sil-verify-all %t/Client.swift -package-name mypkg -I %t > %t/Client-Res.sil
1919
// RUN: %FileCheck %s --check-prefixes=CLIENT-RES,CLIENT-COMMON < %t/Client-Res.sil
2020

2121
// RUN: rm -rf %t/Utils.swiftmodule
@@ -29,11 +29,11 @@
2929
// RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t -swift-version 5 -package-name mypkg -verify
3030

3131
/// Check serialization in SILGEN with resilience not enabled.
32-
// RUN: %target-swift-emit-silgen -emit-verbose-sil -module-name Utils %t/Utils.swift -package-name mypkg -I %t > %t/Utils-NonRes.sil
32+
// RUN: %target-swift-emit-silgen -emit-verbose-sil -sil-verify-all -module-name Utils %t/Utils.swift -package-name mypkg -I %t > %t/Utils-NonRes.sil
3333
// RUN: %FileCheck %s --check-prefixes=UTILS-NONRES,UTILS-COMMON < %t/Utils-NonRes.sil
3434

3535
/// Check for indirect access with a non-resiliently built module dependency.
36-
// RUN: %target-swift-emit-silgen %t/Client.swift -package-name mypkg -I %t > %t/Client-NonRes.sil
36+
// RUN: %target-swift-emit-silgen -sil-verify-all %t/Client.swift -package-name mypkg -I %t > %t/Client-NonRes.sil
3737
// RUN: %FileCheck %s --check-prefixes=CLIENT-NONRES,CLIENT-COMMON < %t/Client-NonRes.sil
3838

3939

0 commit comments

Comments
 (0)