Update the polygen grammer for the new insertvalue and extractvalue syntax.
authorDan Gohman <gohman@apple.com>
Mon, 2 Jun 2008 19:47:09 +0000 (19:47 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 2 Jun 2008 19:47:09 +0000 (19:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51879 91177308-0d34-0410-b5e6-96231b3b80d8

utils/llvm.grm

index aec57f5df7017dbd3e0b66d690f5570f56e149b1..6d6cbe00ea1ae8e7ed7bc9ba53ba9b45ea861ea4 100644 (file)
@@ -223,8 +223,8 @@ ConstExpr::= CastOps "(" ^ ConstVal to Types ^ ")"
  | extractelement "(" ^ ConstVal ^ "," ConstVal ^ ")"
  | insertelement "(" ^ ConstVal ^ "," ConstVal ^ "," ConstVal ^ ")"
  | shufflevector "(" ^ ConstVal ^ "," ConstVal ^ "," ConstVal ^ ")"
- | extractvalue "(" ^ ConstVal IndexList ^ ")"
- | insertvalue "(" ^ ConstVal ^ "," ConstVal IndexList ^ ")" ;
+ | extractvalue "(" ^ ConstVal ^ ConstantIndexList ^ ")"
+ | insertvalue "(" ^ ConstVal ^ "," ConstVal ^ ConstantIndexList ^ ")" ;
 
 ConstVector ::= ConstVector ^ "," ConstVal | ConstVal ;
 
@@ -345,6 +345,8 @@ ParamList ::= Types OptParamAttrs ValueRef OptParamAttrs
 
 IndexList ::= _ | IndexList ^ "," ResolvedVal ;
 
+ConstantIndexList ::= "," EUINT64VAL | ConstantIndexList ^ "," EUINT64VAL ;
+
 OptTailCall ::= tail call | call ;
 
 InstVal ::=
@@ -376,5 +378,5 @@ MemoryInst ::= malloc Types OptCAlign
  | OptVolatile store ResolvedVal ^ "," Types ValueRef OptCAlign
  | getresult Types ValueRef ^ "," EUINT64VAL
  | getelementptr Types ValueRef IndexList
- | extractvalue Types ValueRef IndexList 
- | insertvalue Types ValueRef ^ "," Types ValueRef IndexList ;
+ | extractvalue Types ValueRef ^ ConstantIndexList 
+ | insertvalue Types ValueRef ^ "," Types ValueRef ^ ConstantIndexList ;