common/chain_utils: Don't allow overlapping chains

Signed-off-by: David Shah <davey1576@gmail.com>
This commit is contained in:
David Shah 2018-12-18 15:01:04 +00:00
parent 0a494fa66c
commit f21791fe22

View File

@ -51,6 +51,7 @@ std::vector<CellChain> find_chains(const Context *ctx, F1 cell_type_predicate, F
CellChain chain;
CellInfo *end = start;
while (end != nullptr) {
if (chained.insert(end->name).second)
chain.cells.push_back(end);
end = get_next(ctx, end);
}