Skip to content

Commit d8e3a87

Browse files
committed
Don't rerun DiagnoseStaticExclusivity on deserialized SIL.
1 parent a70cd8c commit d8e3a87

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/SILOptimizer/Mandatory/DiagnoseStaticExclusivity.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,6 +1219,10 @@ class DiagnoseStaticExclusivity : public SILFunctionTransform {
12191219

12201220
private:
12211221
void run() override {
1222+
// Don't rerun diagnostics on deserialized functions.
1223+
if (getFunction()->wasDeserializedCanonical())
1224+
return;
1225+
12221226
SILFunction *Fn = getFunction();
12231227
// This is a staging flag. Eventually the ability to turn off static
12241228
// enforcement will be removed.

0 commit comments

Comments
 (0)