Regenerate.

llvm-svn: 32235
This commit is contained in:
Reid Spencer 2006-12-05 19:21:25 +00:00
parent c77c7157f8
commit 39651ae196
5 changed files with 423 additions and 396 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -333,7 +333,7 @@
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
#line 269 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" #line 270 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
typedef union YYSTYPE { typedef union YYSTYPE {
std::string* String; std::string* String;
TypeInfo Type; TypeInfo Type;

View File

@ -333,7 +333,7 @@
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
#line 269 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" #line 270 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
typedef union YYSTYPE { typedef union YYSTYPE {
std::string* String; std::string* String;
TypeInfo Type; TypeInfo Type;

View File

@ -39,6 +39,7 @@ typedef std::vector<TypeInfo> TypeVector;
static TypeVector EnumeratedTypes; static TypeVector EnumeratedTypes;
typedef std::map<std::string,TypeInfo> TypeMap; typedef std::map<std::string,TypeInfo> TypeMap;
static TypeMap NamedTypes; static TypeMap NamedTypes;
static TypeMap Globals;
void destroy(ValueList* VL) { void destroy(ValueList* VL) {
while (!VL->empty()) { while (!VL->empty()) {
@ -777,29 +778,37 @@ ConstPool : ConstPool OptAssign TYPE TypesV {
$$ = 0; $$ = 0;
} }
| ConstPool OptAssign OptLinkage GlobalType ConstVal GlobalVarAttributes { | ConstPool OptAssign OptLinkage GlobalType ConstVal GlobalVarAttributes {
if (!$2->empty()) if (!$2->empty()) {
*O << *$2 << " = "; *O << *$2 << " = ";
Globals[*$2] = $5.type.clone();
}
*O << *$3 << " " << *$4 << " " << *$5.cnst << " " << *$6 << "\n"; *O << *$3 << " " << *$4 << " " << *$5.cnst << " " << *$6 << "\n";
delete $2; delete $3; delete $4; $5.destroy(); delete $6; delete $2; delete $3; delete $4; $5.destroy(); delete $6;
$$ = 0; $$ = 0;
} }
| ConstPool OptAssign External GlobalType Types GlobalVarAttributes { | ConstPool OptAssign External GlobalType Types GlobalVarAttributes {
if (!$2->empty()) if (!$2->empty()) {
*O << *$2 << " = "; *O << *$2 << " = ";
Globals[*$2] = $5.clone();
}
*O << *$3 << " " << *$4 << " " << *$5.newTy << " " << *$6 << "\n"; *O << *$3 << " " << *$4 << " " << *$5.newTy << " " << *$6 << "\n";
delete $2; delete $3; delete $4; $5.destroy(); delete $6; delete $2; delete $3; delete $4; $5.destroy(); delete $6;
$$ = 0; $$ = 0;
} }
| ConstPool OptAssign DLLIMPORT GlobalType Types GlobalVarAttributes { | ConstPool OptAssign DLLIMPORT GlobalType Types GlobalVarAttributes {
if (!$2->empty()) if (!$2->empty()) {
*O << *$2 << " = "; *O << *$2 << " = ";
Globals[*$2] = $5.clone();
}
*O << *$3 << " " << *$4 << " " << *$5.newTy << " " << *$6 << "\n"; *O << *$3 << " " << *$4 << " " << *$5.newTy << " " << *$6 << "\n";
delete $2; delete $3; delete $4; $5.destroy(); delete $6; delete $2; delete $3; delete $4; $5.destroy(); delete $6;
$$ = 0; $$ = 0;
} }
| ConstPool OptAssign EXTERN_WEAK GlobalType Types GlobalVarAttributes { | ConstPool OptAssign EXTERN_WEAK GlobalType Types GlobalVarAttributes {
if (!$2->empty()) if (!$2->empty()) {
*O << *$2 << " = "; *O << *$2 << " = ";
Globals[*$2] = $5.clone();
}
*O << *$3 << " " << *$4 << " " << *$5.newTy << " " << *$6 << "\n"; *O << *$3 << " " << *$4 << " " << *$5.newTy << " " << *$6 << "\n";
delete $2; delete $3; delete $4; $5.destroy(); delete $6; delete $2; delete $3; delete $4; $5.destroy(); delete $6;
$$ = 0; $$ = 0;