Skip to content

Commit ba84a60

Browse files
committed
Revert "Simplify the loop in layout"
This reverts commit a3676ed.
1 parent b829439 commit ba84a60

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

llvm/utils/TableGen/Basic/SequenceToOffsetTable.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,9 @@ class SequenceToOffsetTable {
116116
for (typename SeqMap::iterator I = Seqs.begin(), E = Seqs.end(); I != E;
117117
++I) {
118118
I->second = Entries;
119-
Entries += I->first.size();
119+
// Include space for a terminator.
120+
Entries += I->first.size() + Terminator.has_value();
120121
}
121-
122-
// Include space for terminators.
123-
if (Terminator)
124-
Entries += Seqs.size();
125122
}
126123

127124
/// get - Returns the offset of Seq in the final table.

0 commit comments

Comments
 (0)