mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[cast-opt] Update optimization of unconditional checked cast to use SILDynamicCastInst.
This commit is contained in:
@@ -1036,6 +1036,15 @@ namespace {
|
||||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
SILValue
|
||||
swift::emitSuccessfulScalarUnconditionalCast(SILBuilder &B, SILLocation loc,
|
||||
SILDynamicCastInst dynamicCast) {
|
||||
return emitSuccessfulScalarUnconditionalCast(
|
||||
B, B.getModule().getSwiftModule(), loc, dynamicCast.getSource(),
|
||||
dynamicCast.getLoweredTargetType(), dynamicCast.getSourceType(),
|
||||
dynamicCast.getTargetType(), dynamicCast.getInstruction());
|
||||
}
|
||||
|
||||
/// Emit an unconditional scalar cast that's known to succeed.
|
||||
SILValue
|
||||
swift::emitSuccessfulScalarUnconditionalCast(SILBuilder &B, ModuleDecl *M,
|
||||
|
||||
Reference in New Issue
Block a user