Skip to content

Commit b22942c

Browse files
committed
Add missing return on nullptr check
1 parent ca4a405 commit b22942c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3392,8 +3392,10 @@ static bool HandleUse(TreePattern &I, TreePatternNodePtr Pat,
33923392
Record *Rec;
33933393
if (Pat->isLeaf()) {
33943394
DefInit *DI = dyn_cast<DefInit>(Pat->getLeafValue());
3395-
if (!DI)
3395+
if (!DI) {
33963396
I.error("Input $" + Pat->getName() + " must be an identifier!");
3397+
return false;
3398+
}
33973399
Rec = DI->getDef();
33983400
} else {
33993401
Rec = Pat->getOperator();

0 commit comments

Comments
 (0)