[llvm] r253835 - [TableGen] Use std::fill instead of a manually coded loop. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 22 12:46:22 PST 2015
Author: ctopper
Date: Sun Nov 22 14:46:22 2015
New Revision: 253835
URL: http://llvm.org/viewvc/llvm-project?rev=253835&view=rev
Log:
[TableGen] Use std::fill instead of a manually coded loop. NFC
Modified:
llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=253835&r1=253834&r2=253835&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Sun Nov 22 14:46:22 2015
@@ -1299,8 +1299,8 @@ TreePatternNode *TreePatternNode::clone(
/// 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();
More information about the llvm-commits
mailing list