aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen/SequenceToOffsetTable.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/TableGen/SequenceToOffsetTable.h')
-rw-r--r--utils/TableGen/SequenceToOffsetTable.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/TableGen/SequenceToOffsetTable.h b/utils/TableGen/SequenceToOffsetTable.h
index b58de4c..66506ea 100644
--- a/utils/TableGen/SequenceToOffsetTable.h
+++ b/utils/TableGen/SequenceToOffsetTable.h
@@ -84,6 +84,11 @@ public:
bool empty() const { return Seqs.empty(); }
+ unsigned size() const {
+ assert(Entries && "Call layout() before size()");
+ return Entries;
+ }
+
/// layout - Computes the final table layout.
void layout() {
assert(Entries == 0 && "Can only call layout() once");