summaryrefslogtreecommitdiff
path: root/utils/llvm.grm
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-01-05 17:29:42 +0000
committerDan Gohman <gohman@apple.com>2009-01-05 17:29:42 +0000
commit8f56ebaf5cdd9e1c6579e0d637ccc65c6aea0726 (patch)
tree83f04a9dbeabbb1b870045547c1a2affeeffd29c /utils/llvm.grm
parent2182f1f9327bd1bdccd4a881861d6720de133298 (diff)
downloadllvm-8f56ebaf5cdd9e1c6579e0d637ccc65c6aea0726.tar.gz
llvm-8f56ebaf5cdd9e1c6579e0d637ccc65c6aea0726.tar.bz2
llvm-8f56ebaf5cdd9e1c6579e0d637ccc65c6aea0726.tar.xz
A few more polygen grammar updates.
- After GlobalAssign, emit addrspace before global/constant, to follow the new syntax. - Eliminate "type void", which is now invalid. - Fix invalid liblists like [, "foo"]. - Tweak whitespace in a few places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61706 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/llvm.grm')
-rw-r--r--utils/llvm.grm21
1 files changed, 10 insertions, 11 deletions
diff --git a/utils/llvm.grm b/utils/llvm.grm
index c5a40cee00..4095858cd4 100644
--- a/utils/llvm.grm
+++ b/utils/llvm.grm
@@ -69,7 +69,7 @@ FPType ::= float | double | "ppc_fp128" | fp128 | "x86_fp80";
LocalName ::= LOCALVAR | STRINGCONSTANT | PCTSTRINGCONSTANT ;
OptLocalName ::= LocalName | _ ;
-OptAddrSpace ::= - addrspace "(" ^ EUINT64VAL ^ ")" | _ ;
+OptAddrSpace ::= - addrspace ^ "(" ^ EUINT64VAL ^ ")" | _ ;
OptLocalAssign ::= LocalName "=" | _ ;
@@ -261,13 +261,12 @@ Definition
| declare FunctionProto
| - module asm AsmBlock
| OptLocalAssign type Types
- | OptLocalAssign type void
- | OptGlobalAssign GVVisibilityStyle ThreadLocal GlobalType ConstVal
- OptAddrSpace GlobalVarAttributes
- | OptGlobalAssign GVInternalLinkage GVVisibilityStyle ThreadLocal GlobalType
- ConstVal OptAddrSpace GlobalVarAttributes
- | OptGlobalAssign GVExternalLinkage GVVisibilityStyle ThreadLocal GlobalType
- Types OptAddrSpace GlobalVarAttributes
+ | OptGlobalAssign GVVisibilityStyle ThreadLocal OptAddrSpace OptAddrSpace
+ ConstVal GlobalVarAttributes
+ | OptGlobalAssign GVInternalLinkage GVVisibilityStyle ThreadLocal OptAddrSpace
+ GlobalType ConstVal GlobalVarAttributes
+ | OptGlobalAssign GVExternalLinkage GVVisibilityStyle ThreadLocal OptAddrSpace
+ GlobalType Types GlobalVarAttributes
| OptGlobalAssign GVVisibilityStyle alias AliasLinkage AliaseeRef
| target TargetDefinition
| deplibs "=" LibrariesDefinition
@@ -278,9 +277,9 @@ AsmBlock ::= STRINGCONSTANT ;
TargetDefinition ::= triple "=" STRINGCONSTANT
| datalayout "=" STRINGCONSTANT ;
-LibrariesDefinition ::= "[" LibList "]";
+LibrariesDefinition ::= "[" ( LibList | _ ) "]";
-LibList ::= LibList ^ "," STRINGCONSTANT | STRINGCONSTANT | _ ;
+LibList ::= LibList ^ "," STRINGCONSTANT | STRINGCONSTANT ;
ArgListH ::= ArgListH ^ "," Types OptParamAttrs OptLocalName
| Types OptParamAttrs OptLocalName ;
@@ -288,7 +287,7 @@ ArgListH ::= ArgListH ^ "," Types OptParamAttrs OptLocalName
ArgList ::= ArgListH | ArgListH ^ "," "..." | "..." | _ ;
FunctionHeaderH ::= OptCallingConv OptRetAttrs ResultTypes
- GlobalName "(" ^ ArgList ^ ")"
+ GlobalName ^ "(" ^ ArgList ^ ")"
OptFuncAttrs OptSection OptAlign OptGC ;
BEGIN ::= ( begin | "{" ) ^ "\n";