Make MatchContext::WorkItem, CalleeFunction, InitRepr, ReturnTypeInfo Printable (#5535)

Found these to be useful for debugging.
This commit is contained in:
Boaz Brickner
2025-05-27 16:50:13 +00:00
committed by GitHub
parent 0a5dc9a9cc
commit 5095af991f
4 changed files with 62 additions and 4 deletions
+6 -1
View File
@@ -44,10 +44,15 @@ enum class MatchKind : uint8_t {
// The collected state of a pattern-matching operation.
class MatchContext {
public:
struct WorkItem {
struct WorkItem : Printable<WorkItem> {
SemIR::InstId pattern_id;
// `None` when processing the callee side.
SemIR::InstId scrutinee_id;
auto Print(llvm::raw_ostream& out) const -> void {
out << "{pattern_id: " << pattern_id << ", scrutinee_id: " << scrutinee_id
<< "}";
}
};
// Constructs a MatchContext. If `callee_specific_id` is not `None`, this