Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32235 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/llvm-upgrade/UpgradeParser.y.cvs b/tools/llvm-upgrade/UpgradeParser.y.cvs
index 8aa2beb..fd1c293 100644
--- a/tools/llvm-upgrade/UpgradeParser.y.cvs
+++ b/tools/llvm-upgrade/UpgradeParser.y.cvs
@@ -39,6 +39,7 @@
static TypeVector EnumeratedTypes;
typedef std::map<std::string,TypeInfo> TypeMap;
static TypeMap NamedTypes;
+static TypeMap Globals;
void destroy(ValueList* VL) {
while (!VL->empty()) {
@@ -777,29 +778,37 @@
$$ = 0;
}
| ConstPool OptAssign OptLinkage GlobalType ConstVal GlobalVarAttributes {
- if (!$2->empty())
+ if (!$2->empty()) {
*O << *$2 << " = ";
+ Globals[*$2] = $5.type.clone();
+ }
*O << *$3 << " " << *$4 << " " << *$5.cnst << " " << *$6 << "\n";
delete $2; delete $3; delete $4; $5.destroy(); delete $6;
$$ = 0;
}
| ConstPool OptAssign External GlobalType Types GlobalVarAttributes {
- if (!$2->empty())
+ if (!$2->empty()) {
*O << *$2 << " = ";
+ Globals[*$2] = $5.clone();
+ }
*O << *$3 << " " << *$4 << " " << *$5.newTy << " " << *$6 << "\n";
delete $2; delete $3; delete $4; $5.destroy(); delete $6;
$$ = 0;
}
| ConstPool OptAssign DLLIMPORT GlobalType Types GlobalVarAttributes {
- if (!$2->empty())
+ if (!$2->empty()) {
*O << *$2 << " = ";
+ Globals[*$2] = $5.clone();
+ }
*O << *$3 << " " << *$4 << " " << *$5.newTy << " " << *$6 << "\n";
delete $2; delete $3; delete $4; $5.destroy(); delete $6;
$$ = 0;
}
| ConstPool OptAssign EXTERN_WEAK GlobalType Types GlobalVarAttributes {
- if (!$2->empty())
+ if (!$2->empty()) {
*O << *$2 << " = ";
+ Globals[*$2] = $5.clone();
+ }
*O << *$3 << " " << *$4 << " " << *$5.newTy << " " << *$6 << "\n";
delete $2; delete $3; delete $4; $5.destroy(); delete $6;
$$ = 0;