Skip to content

Commit bf8c1c3

Browse files
committed
---
yaml --- r: 270271 b: refs/heads/tensorflow-merge c: 9c9ad09 h: refs/heads/master i: 270269: 7eff42e 270267: db9e1b1 270263: 5614870 270255: 46ada06 270239: 8454264 270207: 5bf81ef
1 parent 63534f2 commit bf8c1c3

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1128,4 +1128,4 @@ refs/tags/swift-4.2.1-RELEASE: 02a6ca969ea1387475b6caeb69c31186df7d30b6
11281128
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-11-01-a: 3b0299288f8287094b9ef587f46df54f42a347af
11291129
refs/heads/5.0-add-libcxx-and-clang-tools-extra: eb6e6f9b0a551e7804e96d0dac83add11ec73977
11301130
refs/heads/Fix-DataCreateSmall: e15aff31b7406a5b2dadac9d7810941cec85035a
1131-
refs/heads/tensorflow-merge: 5e617b5cb9c39b86a1d70e1ad6def329d95531fc
1131+
refs/heads/tensorflow-merge: 9c9ad09f15c34e383823c576266de0470b4e410f

branches/tensorflow-merge/lib/SIL/SILVerifier.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1477,8 +1477,13 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
14771477
}
14781478

14791479
void checkAllocGlobalInst(AllocGlobalInst *AGI) {
1480+
SILGlobalVariable *RefG = AGI->getReferencedGlobal();
1481+
if (auto *VD = RefG->getDecl()) {
1482+
require(!VD->isResilient(F.getModule().getSwiftModule(),
1483+
F.getResilienceExpansion()),
1484+
"cannot access storage of resilient global");
1485+
}
14801486
if (F.isSerialized()) {
1481-
SILGlobalVariable *RefG = AGI->getReferencedGlobal();
14821487
require(RefG->isSerialized()
14831488
|| hasPublicVisibility(RefG->getLinkage()),
14841489
"alloc_global inside fragile function cannot "
@@ -1490,6 +1495,11 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
14901495
SILGlobalVariable *RefG = GAI->getReferencedGlobal();
14911496
require(GAI->getType().getObjectType() == RefG->getLoweredType(),
14921497
"global_addr/value must be the type of the variable it references");
1498+
if (auto *VD = RefG->getDecl()) {
1499+
require(!VD->isResilient(F.getModule().getSwiftModule(),
1500+
F.getResilienceExpansion()),
1501+
"cannot access storage of resilient global");
1502+
}
14931503
if (F.isSerialized()) {
14941504
require(RefG->isSerialized()
14951505
|| hasPublicVisibility(RefG->getLinkage()),

0 commit comments

Comments
 (0)