File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
llvm/lib/CodeGen/MIRParser Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -470,7 +470,7 @@ class MIParser {
470
470
bool parseJumpTableIndexOperand (MachineOperand &Dest);
471
471
bool parseExternalSymbolOperand (MachineOperand &Dest);
472
472
bool parseMCSymbolOperand (MachineOperand &Dest);
473
- bool parseMDNode (MDNode *&Node);
473
+ [[nodiscard]] bool parseMDNode (MDNode *&Node);
474
474
bool parseDIExpression (MDNode *&Expr);
475
475
bool parseDILocation (MDNode *&Expr);
476
476
bool parseMetadataOperand (MachineOperand &Dest);
@@ -3471,7 +3471,8 @@ bool MIParser::parseHeapAllocMarker(MDNode *&Node) {
3471
3471
assert (Token.is (MIToken::kw_heap_alloc_marker) &&
3472
3472
" Invalid token for a heap alloc marker!" );
3473
3473
lex ();
3474
- parseMDNode (Node);
3474
+ if (parseMDNode (Node))
3475
+ return true ;
3475
3476
if (!Node)
3476
3477
return error (" expected a MDNode after 'heap-alloc-marker'" );
3477
3478
if (Token.isNewlineOrEOF () || Token.is (MIToken::coloncolon) ||
@@ -3487,7 +3488,8 @@ bool MIParser::parsePCSections(MDNode *&Node) {
3487
3488
assert (Token.is (MIToken::kw_pcsections) &&
3488
3489
" Invalid token for a PC sections!" );
3489
3490
lex ();
3490
- parseMDNode (Node);
3491
+ if (parseMDNode (Node))
3492
+ return true ;
3491
3493
if (!Node)
3492
3494
return error (" expected a MDNode after 'pcsections'" );
3493
3495
if (Token.isNewlineOrEOF () || Token.is (MIToken::coloncolon) ||
You can’t perform that action at this time.
0 commit comments