[TableGen] Use std::fill instead of a manually coded loop. NFC
authorCraig Topper <craig.topper@gmail.com>
Sun, 22 Nov 2015 20:46:22 +0000 (20:46 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sun, 22 Nov 2015 20:46:22 +0000 (20:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253835 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/CodeGenDAGPatterns.cpp

index e916d87ce45c9d0d1d3ab04696b9205794e2c73d..90a8861bdcdbfd3daa8450104897327f7c584afb 100644 (file)
@@ -1299,8 +1299,8 @@ TreePatternNode *TreePatternNode::clone() const {
 
 /// 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();