The parser now accepts "external" global variables, in addition to the backwards
authorChris Lattner <sabre@nondot.org>
Sun, 6 Oct 2002 22:45:09 +0000 (22:45 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 6 Oct 2002 22:45:09 +0000 (22:45 +0000)
compatible "uninitialized" global variables

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4050 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/Lexer.l
lib/AsmParser/llvmAsmParser.y

index b8a795567d2786ce6d94e7992cc226fbdce888a6..7776c90a90a1c3ef8d17f91c2754f343b35b7e1f 100644 (file)
@@ -155,7 +155,8 @@ global          { return GLOBAL; }
 constant        { return CONSTANT; }
 const           { return CONST; }
 internal        { return INTERNAL; }
-uninitialized   { return UNINIT; }
+uninitialized   { return EXTERNAL; }    /* Deprecated, turn into external */
+external        { return EXTERNAL; }
 implementation  { return IMPLEMENTATION; }
 \.\.\.          { return DOTDOTDOT; }
 null            { return NULL_TOK; }
index de5f469d11f375a4bf728aff365c6b8cc01ccc96..f3436dc78285344f89ff4b6e1fc220a3e5b1f2b5 100644 (file)
@@ -679,8 +679,8 @@ Module *RunVMAsmParser(const string &Filename, FILE *F) {
 %type  <StrVal>  OptVAR_ID OptAssign FuncName
 
 
-%token IMPLEMENTATION TRUE FALSE BEGINTOK ENDTOK DECLARE GLOBAL CONSTANT UNINIT
-%token TO EXCEPT DOTDOTDOT NULL_TOK CONST INTERNAL OPAQUE NOT
+%token IMPLEMENTATION TRUE FALSE BEGINTOK ENDTOK DECLARE GLOBAL CONSTANT
+%token TO EXCEPT DOTDOTDOT NULL_TOK CONST INTERNAL OPAQUE NOT EXTERNAL
 
 // Basic Block Terminating Operators 
 %token <TermOpVal> RET BR SWITCH
@@ -1145,7 +1145,7 @@ ConstPool : ConstPool OptAssign CONST ConstVal {
       }
     }
   }
-  | ConstPool OptAssign OptInternal UNINIT GlobalType Types {
+  | ConstPool OptAssign OptInternal EXTERNAL GlobalType Types {
     const Type *Ty = *$6;
     // Global declarations appear in Constant Pool
     GlobalVariable *GV = new GlobalVariable(Ty, $5, $3);