Tidyup P->getComplexPatternInfo call by moving it inside if( != NULL) test. NFCI.

llvm-svn: 314202
This commit is contained in:
Simon Pilgrim 2017-09-26 12:59:01 +00:00
parent e7d4cd639b
commit 40687014ea
1 changed files with 1 additions and 3 deletions

View File

@ -920,10 +920,8 @@ static unsigned getPatternSize(const TreePatternNode *P,
if (P->isLeaf() && isa<IntInit>(P->getLeafValue()))
Size += 2;
const ComplexPattern *AM = P->getComplexPatternInfo(CGP);
if (AM) {
if (const ComplexPattern *AM = P->getComplexPatternInfo(CGP)) {
Size += AM->getComplexity();
// We don't want to count any children twice, so return early.
return Size;
}