Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions llvm/include/llvm/ADT/SCCIterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,10 @@ scc_member_iterator<GraphT, GT>::scc_member_iterator(
// Initialize auxilary node information.
NodeInfoMap.clear();
for (auto *Node : InputNodes) {
// This is specifically used to construct a `NodeInfo` object in place. An
// insert operation will involve a copy construction which invalidate the
// initial value of the `Group` field which should be `this`.
(void)NodeInfoMap[Node].Group;
// Construct a `NodeInfo` object in place. `insert()` would involve a copy
// construction, invalidating the initial value of the `Group` field, which
// should be `this`.
NodeInfoMap.try_emplace(Node);
}

// Sort edges by weights.
Expand Down