mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-26 21:20:29 +00:00
Add support for field exprs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4850 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
28520c4b61
commit
34a7769b0b
@ -258,6 +258,13 @@ Value : INTVAL {
|
||||
} | '[' DefList ']' {
|
||||
$$ = new ListInit(*$2);
|
||||
delete $2;
|
||||
} | Value '.' ID {
|
||||
if (!$1->getFieldType(*$3)) {
|
||||
err() << "Cannot access field '" << *$3 << "' of value '" << *$1 << "!\n";
|
||||
abort();
|
||||
}
|
||||
$$ = new FieldInit($1, *$3);
|
||||
delete $3;
|
||||
};
|
||||
|
||||
DefList : /*empty */ {
|
||||
|
@ -258,6 +258,13 @@ Value : INTVAL {
|
||||
} | '[' DefList ']' {
|
||||
$$ = new ListInit(*$2);
|
||||
delete $2;
|
||||
} | Value '.' ID {
|
||||
if (!$1->getFieldType(*$3)) {
|
||||
err() << "Cannot access field '" << *$3 << "' of value '" << *$1 << "!\n";
|
||||
abort();
|
||||
}
|
||||
$$ = new FieldInit($1, *$3);
|
||||
delete $3;
|
||||
};
|
||||
|
||||
DefList : /*empty */ {
|
||||
|
Loading…
Reference in New Issue
Block a user