diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 24b49b246cc..cced06be1f5 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2409,8 +2409,9 @@ void SelectionDAG::ReplaceAllUsesOfValueWith(SDOperand From, SDOperand To, return; } - // Get all of the users in a nice, deterministically ordered, uniqued set. - SetVector Users(From.Val->use_begin(), From.Val->use_end()); + // Get all of the users of From.Val. We want these in a nice, + // deterministically ordered and uniqued set, so we use a SmallSetVector. + SmallSetVector Users(From.Val->use_begin(), From.Val->use_end()); while (!Users.empty()) { // We know that this user uses some value of From. If it is the right