forked from OSchip/llvm-project
Tidyup P->getComplexPatternInfo call by moving it inside if( != NULL) test. NFCI.
llvm-svn: 314202
This commit is contained in:
parent
e7d4cd639b
commit
40687014ea
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue