forked from OSchip/llvm-project
[TableGen] Fix use of *CurRec when CurRec is null.
I cannot build with the undefined sanitizer on Visual Studio.
This commit is contained in:
parent
024af42c60
commit
fe50b7363a
|
@ -3209,10 +3209,7 @@ bool TGParser::ParseAssert(MultiClass *CurMultiClass, Record *CurRec) {
|
|||
} else if (CurRec) {
|
||||
CurRec->addAssertion(ConditionLoc, Condition, Message);
|
||||
} else { // at top level
|
||||
RecordResolver R(*CurRec);
|
||||
Init *Value = Condition->resolveReferences(R);
|
||||
Init *Text = Message->resolveReferences(R);
|
||||
CheckAssert(ConditionLoc, Value, Text);
|
||||
CheckAssert(ConditionLoc, Condition, Message);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue