@returns the tag id, if @a _item is a PushTag or Tag into the current subassembly, std::nullopt otherwise.
| 67 | } |
| 68 | /// @returns the tag id, if @a _item is a PushTag or Tag into the current subassembly, std::nullopt otherwise. |
| 69 | std::optional<size_t> getLocalTag(AssemblyItem const& _item) |
| 70 | { |
| 71 | if (_item.type() != PushTag && _item.type() != Tag) |
| 72 | return std::nullopt; |
| 73 | auto [subId, tag] = _item.splitForeignPushTag(); |
| 74 | if (!subId.empty()) |
| 75 | return std::nullopt; |
| 76 | return tag; |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | bool Inliner::isInlineCandidate(size_t _tag, ranges::span<AssemblyItem const> _items) const |
no test coverage detected