diff --git a/utils/TableGen/FileParser.y b/utils/TableGen/FileParser.y index 205fee45ce1..c0e478d210a 100644 --- a/utils/TableGen/FileParser.y +++ b/utils/TableGen/FileParser.y @@ -90,7 +90,8 @@ static void setValue(const std::string &ValName, std::vector *BitList, Init *V) { if (!V) return; - RecordVal *RV = CurRec->getValue(ValName); + Record *TheRec = getActiveRec(); + RecordVal *RV = TheRec->getValue(ValName); if (RV == 0) { err() << "Value '" << ValName << "' unknown!\n"; exit(1);