git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253835
91177308-0d34-0410-b5e6-
96231b3b80d8
/// RemoveAllTypes - Recursively strip all the types of this tree.
void TreePatternNode::RemoveAllTypes() {
/// RemoveAllTypes - Recursively strip all the types of this tree.
void TreePatternNode::RemoveAllTypes() {
- for (unsigned i = 0, e = Types.size(); i != e; ++i)
- Types[i] = EEVT::TypeSet(); // Reset to unknown type.
+ // Reset to unknown type.
+ std::fill(Types.begin(), Types.end(), EEVT::TypeSet());
if (isLeaf()) return;
for (unsigned i = 0, e = getNumChildren(); i != e; ++i)
getChild(i)->RemoveAllTypes();
if (isLeaf()) return;
for (unsigned i = 0, e = getNumChildren(); i != e; ++i)
getChild(i)->RemoveAllTypes();