aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/TableGen/TGParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/TableGen/TGParser.cpp')
-rw-r--r--llvm/lib/TableGen/TGParser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/TableGen/TGParser.cpp b/llvm/lib/TableGen/TGParser.cpp
index 6c52edc..14c529c 100644
--- a/llvm/lib/TableGen/TGParser.cpp
+++ b/llvm/lib/TableGen/TGParser.cpp
@@ -3023,7 +3023,7 @@ bool TGParser::ParseBodyItem(Record *CurRec) {
return ParseAssert(nullptr, CurRec);
if (Lex.getCode() == tgtok::Defvar)
- return ParseDefvar();
+ return ParseDefvar(CurRec);
if (Lex.getCode() != tgtok::Let) {
if (!ParseDeclaration(CurRec, false))
@@ -3254,7 +3254,7 @@ bool TGParser::ParseDefset() {
///
/// Defvar ::= DEFVAR Id '=' Value ';'
///
-bool TGParser::ParseDefvar() {
+bool TGParser::ParseDefvar(Record *CurRec) {
assert(Lex.getCode() == tgtok::Defvar);
Lex.Lex(); // Eat the 'defvar' token
@@ -3273,7 +3273,7 @@ bool TGParser::ParseDefvar() {
if (!consume(tgtok::equal))
return TokError("expected '='");
- Init *Value = ParseValue(nullptr);
+ Init *Value = ParseValue(CurRec);
if (!Value)
return true;