Merge pull request #6799 from shajrawi/devirtualize_volatile_fix

[SILOptimizer] Do not devirtualize instructions when dynamic dispatch is required
This commit is contained in:
Joe Shajrawi
2017-01-13 17:47:54 -08:00
committed by GitHub

View File

@@ -565,6 +565,11 @@ bool swift::canDevirtualizeClassMethod(FullApplySite AI,
return false;
}
if (MI->isVolatile()) {
// dynamic dispatch is semantically required, can't devirtualize
return false;
}
// Type of the actual function to be called.
CanSILFunctionType GenCalleeType = F->getLoweredFunctionType();