| 1549 | } |
| 1550 | |
| 1551 | void Differ::MatchTypeForwardPointersByName(const IdGroup& src, |
| 1552 | const IdGroup& dst) { |
| 1553 | // Given two sets of compatible groups of OpTypeForwardPointer instructions, |
| 1554 | // attempts to match them by name. |
| 1555 | |
| 1556 | // Group them by debug info and loop over them. |
| 1557 | GroupIdsAndMatch<std::string>( |
| 1558 | src, dst, "", &Differ::GetSanitizedName, |
| 1559 | [this](const IdGroup& src_group, const IdGroup& dst_group) { |
| 1560 | // Match only if there's a unique forward declaration with this debug |
| 1561 | // name. |
| 1562 | if (src_group.size() == 1 && dst_group.size() == 1) { |
| 1563 | id_map_.MapIds(src_group[0], dst_group[0]); |
| 1564 | } |
| 1565 | }); |
| 1566 | } |
| 1567 | |
| 1568 | void Differ::MatchTypeForwardPointersByTypeOp(const IdGroup& src, |
| 1569 | const IdGroup& dst) { |