OSDN Git Service

Use const where possible. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 27 Sep 2017 10:03:17 +0000 (10:03 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 27 Sep 2017 10:03:17 +0000 (10:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314292 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/CodeGenDAGPatterns.cpp

index 9e98da1..1b5c1ae 100644 (file)
@@ -933,7 +933,7 @@ static unsigned getPatternSize(const TreePatternNode *P,
 
   // Count children in the count if they are also nodes.
   for (unsigned i = 0, e = P->getNumChildren(); i != e; ++i) {
-    TreePatternNode *Child = P->getChild(i);
+    const TreePatternNode *Child = P->getChild(i);
     if (!Child->isLeaf() && Child->getNumTypes()) {
       const TypeSetByHwMode &T0 = Child->getType(0);
       // At this point, all variable type sets should be simple, i.e. only