Skip to content

Commit ede48cd

Browse files
committed
[NFC] Minor cleanup in patterns
Some things noticed by inspection: - Old spelling of Optional.some - pattern dump was using the wrong iterator variable and would crash - addColumns is never used because the row matrix doesn’t expand tuples
1 parent f83d1a7 commit ede48cd

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lib/SILGen/SILGenPattern.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ static void dumpPattern(const Pattern *p, llvm::raw_ostream &os) {
7878
}
7979

8080
case PatternKind::OptionalSome:
81-
os << ".Some";
81+
os << ".some";
8282
return;
8383

8484
case PatternKind::Bool:
@@ -515,11 +515,6 @@ class ClauseRow {
515515
return Columns;
516516
}
517517

518-
/// Add new columns to the end of the row.
519-
void addColumns(ArrayRef<Pattern *> columns) {
520-
Columns.append(columns.begin(), columns.end());
521-
}
522-
523518
/// Specialize the given column to the given array of new columns.
524519
///
525520
/// Places the new columns using the column-specialization algorithm.
@@ -680,7 +675,7 @@ void ClauseMatrix::print(llvm::raw_ostream &out) const {
680675
std::string &str = rowStrings.back();
681676
{
682677
llvm::raw_string_ostream ss(str);
683-
dumpPattern(row[r], ss);
678+
dumpPattern(row[c], ss);
684679
ss.flush();
685680
}
686681

0 commit comments

Comments
 (0)