mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-28 14:36:34 +00:00
The parser now accepts "external" global variables, in addition to the backwards
compatible "uninitialized" global variables llvm-svn: 4050
This commit is contained in:
parent
24e01d2066
commit
6408586b7b
@ -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; }
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user