mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #6799 from shajrawi/devirtualize_volatile_fix
[SILOptimizer] Do not devirtualize instructions when dynamic dispatch is required
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user