Add missing "InitializerConstant" to global variable syntax in LangRef.
authorBob Wilson <bob.wilson@apple.com>
Thu, 12 Jun 2014 18:42:55 +0000 (18:42 +0000)
committerBob Wilson <bob.wilson@apple.com>
Thu, 12 Jun 2014 18:42:55 +0000 (18:42 +0000)
The syntax for Global Variables in LangRef is missing the initializer.
This syntax section was added in r199218 along with changes to the
dllexport/dllimport handling, and I guess it was just an oversight to omit the
initializer values. I’ve marked the initializer as optional because this syntax
is used for both declarations and definitions.

llvm-svn: 210808

llvm/docs/LangRef.rst

index 213b99a..434bcbe 100644 (file)
@@ -589,8 +589,8 @@ Syntax::
 
     [@<GlobalVarName> =] [Linkage] [Visibility] [DLLStorageClass] [ThreadLocal]
                          [unnamed_addr] [AddrSpace] [ExternallyInitialized]
-                         <global | constant> <Type>
-                         [, section "name"] [, align <Alignment>]
+                         <global | constant> <Type> [<InitializerConstant>
+                         [, section "name"] [, align <Alignment>]]
 
 For example, the following defines a global in a numbered address space
 with an initializer, section, and alignment: