Skip to content

Commit

Permalink
[NFC][InstanceGraph] Add a method to drop the last element of an inst…
Browse files Browse the repository at this point in the history
…ance path
  • Loading branch information
nandor committed Jan 29, 2024
1 parent bab53e6 commit 86246fd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/circt/Support/InstanceGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ class InstancePath final {

InstancePath dropFront() const { return InstancePath(path.drop_front()); }

InstancePath dropBack() const { return InstancePath(path.drop_back()); }

InstanceOpInterface operator[](size_t idx) const { return path[idx]; }
ArrayRef<InstanceOpInterface>::iterator begin() const { return path.begin(); }
ArrayRef<InstanceOpInterface>::iterator end() const { return path.end(); }
Expand Down

0 comments on commit 86246fd

Please sign in to comment.