mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[region-isolation] Add the ability for the analysis to emit "unknown error" partition ops in case we detect a case we cannot pattern match.
DISCUSSION: The analysis itself is unable to emit errors. So we achieve the same functionality by in such cases emitting a partition op that signals to our user that when they process that partition op they should emit an "unknown pattern" error at the partition op's instructions. I have wanted this for a long time, but I never got around to it.
This commit is contained in:
@@ -94,6 +94,10 @@ void PartitionOp::print(llvm::raw_ostream &os, bool extraSpace) const {
|
||||
os << "%%" << opArgs[0];
|
||||
break;
|
||||
}
|
||||
case PartitionOpKind::UnknownPatternError:
|
||||
os << "unknown pattern error ";
|
||||
os << "%%" << opArgs[0];
|
||||
break;
|
||||
}
|
||||
os << ": " << *getSourceInst();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user