1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

Make sure to clear CurDefmPrefix = 0, otherwise stuff after a defm won't

parse right.  This fixes TableGen/MultiClass.td

llvm-svn: 30037
This commit is contained in:
Chris Lattner 2006-09-01 22:07:27 +00:00
parent dc8b45e90e
commit 997e7e3d45
3 changed files with 15 additions and 12 deletions

View File

@ -351,9 +351,9 @@ static const short yyrline[] = { 0,
523, 525, 531, 531, 532, 532, 534, 536, 540, 545, 523, 525, 531, 531, 532, 532, 534, 536, 540, 545,
550, 553, 557, 560, 565, 566, 566, 568, 568, 570, 550, 553, 557, 560, 565, 566, 566, 568, 568, 570,
577, 595, 620, 634, 639, 641, 643, 647, 657, 671, 577, 595, 620, 634, 639, 641, 643, 647, 657, 671,
674, 678, 689, 691, 693, 698, 698, 763, 763, 764, 674, 678, 689, 691, 693, 698, 698, 764, 764, 765,
764, 766, 771, 771, 774, 774, 777, 780, 784, 784, 765, 767, 772, 772, 775, 775, 778, 781, 785, 785,
786 787
}; };
#endif #endif
@ -1813,45 +1813,46 @@ case 87:
delete &TemplateVals; delete &TemplateVals;
delete yyvsp[-4].StrVal; delete yyvsp[-4].StrVal;
CurDefmPrefix = 0;
; ;
break;} break;}
case 88: case 88:
#line 763 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" #line 764 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y"
{; {;
break;} break;}
case 89: case 89:
#line 763 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" #line 764 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y"
{; {;
break;} break;}
case 92: case 92:
#line 766 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" #line 767 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y"
{ {
LetStack.back().push_back(LetRecord(*yyvsp[-3].StrVal, yyvsp[-2].BitList, yyvsp[0].Initializer)); LetStack.back().push_back(LetRecord(*yyvsp[-3].StrVal, yyvsp[-2].BitList, yyvsp[0].Initializer));
delete yyvsp[-3].StrVal; delete yyvsp[-2].BitList; delete yyvsp[-3].StrVal; delete yyvsp[-2].BitList;
; ;
break;} break;}
case 95: case 95:
#line 774 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" #line 775 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y"
{ LetStack.push_back(std::vector<LetRecord>()); ; { LetStack.push_back(std::vector<LetRecord>()); ;
break;} break;}
case 97: case 97:
#line 777 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" #line 778 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y"
{ {
LetStack.pop_back(); LetStack.pop_back();
; ;
break;} break;}
case 98: case 98:
#line 780 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" #line 781 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y"
{ {
LetStack.pop_back(); LetStack.pop_back();
; ;
break;} break;}
case 99: case 99:
#line 784 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" #line 785 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y"
{; {;
break;} break;}
case 100: case 100:
#line 784 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" #line 785 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y"
{; {;
break;} break;}
} }
@ -2076,7 +2077,7 @@ yyerrhandle:
} }
return 1; return 1;
} }
#line 788 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" #line 789 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y"
int yyerror(const char *ErrorMsg) { int yyerror(const char *ErrorMsg) {

View File

@ -758,6 +758,7 @@ DefMInst : DEFM ID { CurDefmPrefix = $2; } ':' SubClassRef ';' {
delete &TemplateVals; delete &TemplateVals;
delete $2; delete $2;
CurDefmPrefix = 0;
}; };
Object : ClassInst {} | DefInst {}; Object : ClassInst {} | DefInst {};

View File

@ -758,6 +758,7 @@ DefMInst : DEFM ID { CurDefmPrefix = $2; } ':' SubClassRef ';' {
delete &TemplateVals; delete &TemplateVals;
delete $2; delete $2;
CurDefmPrefix = 0;
}; };
Object : ClassInst {} | DefInst {}; Object : ClassInst {} | DefInst {};