File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -505,6 +505,25 @@ bool CrossModuleOptimization::canSerializeFunction(
505
505
// are not covered in the visitor) can be serialized.
506
506
if (!canSerializeFieldsByInstructionKind (&inst, canSerializeFlags, maxDepth))
507
507
return false ;
508
+
509
+ for (SILValue result : inst.getResults ()) {
510
+ if (!canSerializeType (result->getType ())) {
511
+ llvm::dbgs () << " \n Checking result: \n " ;
512
+ inst.dump ();
513
+ llvm::dbgs () << " \n In function: \n " ;
514
+ inst.getFunction ()->dump ();
515
+ return false ;
516
+ }
517
+ }
518
+ for (Operand &op : inst.getAllOperands ()) {
519
+ if (!canSerializeType (op.get ()->getType ())) {
520
+ llvm::dbgs () << " \n Checking operand: \n " ;
521
+ inst.dump ();
522
+ llvm::dbgs () << " \n In function: \n " ;
523
+ inst.getFunction ()->dump ();
524
+ return false ;
525
+ }
526
+ }
508
527
}
509
528
}
510
529
M.reclaimUnresolvedLocalArchetypeDefinitions ();
You can’t perform that action at this time.
0 commit comments