Skip to content

Commit 1875361

Browse files
committed
[IRGen] Added dominance scope.
1 parent e5d87f7 commit 1875361

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/IRGen/GenCast.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,7 @@ void irgen::emitScalarCheckedCast(IRGenFunction &IGF,
883883

884884
bool sourceWrappedInOptional = false;
885885

886+
llvm::Optional<ConditionalDominanceScope> domScope;
886887
if (auto sourceOptObjectType = sourceLoweredType.getOptionalObjectType()) {
887888
// Translate the value from an enum representation to a possibly-null
888889
// representation. Note that we assume that this projection is safe
@@ -912,6 +913,7 @@ void irgen::emitScalarCheckedCast(IRGenFunction &IGF,
912913
Builder.CreateCondBr(isNotNil, isNotNilContBB, nilMergeBB);
913914

914915
Builder.emitBlock(isNotNilContBB);
916+
domScope.emplace(IGF);
915917
}
916918
}
917919

0 commit comments

Comments
 (0)