Skip to content

Commit d7b6fcf

Browse files
committed
Really add a comment
1 parent 38c5af0 commit d7b6fcf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/utils/TableGen/DecoderTableEmitter.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ DecoderTableEmitter::computeNodeSize(const DecoderTreeNode *Node) const {
5858
Size += getULEB128Size(Val) + getULEB128Size(ChildSize) + ChildSize;
5959
}
6060

61+
// The last child is emitted with sentinel value 0 instead of the size.
62+
// See the comment in emitSwitchFieldNode.
6163
auto [Val, Child] = *std::prev(N->case_end());
6264
unsigned ChildSize = computeNodeSize(Child);
6365
Size += getULEB128Size(Val) + getULEB128Size(0) + ChildSize;

0 commit comments

Comments
 (0)