File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -499,12 +499,16 @@ bool CrossModuleOptimization::canSerializeFunction(
499
499
// First, visit each instruction and see if its lowered types
500
500
// are serializalbe and track them in a map.
501
501
visitor.visit (&inst);
502
- if (!visitor.canSerializeTypesInInst (&inst))
502
+ if (!visitor.canSerializeTypesInInst (&inst)) {
503
+ M.reclaimUnresolvedLocalArchetypeDefinitions ();
503
504
return false ;
505
+ }
504
506
// If serializable, check if any fields in the instruction (that
505
507
// are not covered in the visitor) can be serialized.
506
- if (!canSerializeFieldsByInstructionKind (&inst, canSerializeFlags, maxDepth))
508
+ if (!canSerializeFieldsByInstructionKind (&inst, canSerializeFlags, maxDepth)) {
509
+ M.reclaimUnresolvedLocalArchetypeDefinitions ();
507
510
return false ;
511
+ }
508
512
}
509
513
}
510
514
M.reclaimUnresolvedLocalArchetypeDefinitions ();
You can’t perform that action at this time.
0 commit comments