summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-upgrade/UpgradeParser.y.cvs
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-05 19:21:25 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-05 19:21:25 +0000
commit39651ae1967bdbfc6ce4c0d108811cda80a220f5 (patch)
tree67abd244eddfff8cd3cbdef2bf856e27a6321995 /llvm/tools/llvm-upgrade/UpgradeParser.y.cvs
parentc77c7157f8f1b73ed3ef2f6a47b987e5b3529dc2 (diff)
downloadbcm5719-llvm-39651ae1967bdbfc6ce4c0d108811cda80a220f5.tar.gz
bcm5719-llvm-39651ae1967bdbfc6ce4c0d108811cda80a220f5.zip
Regenerate.
llvm-svn: 32235
Diffstat (limited to 'llvm/tools/llvm-upgrade/UpgradeParser.y.cvs')
-rw-r--r--llvm/tools/llvm-upgrade/UpgradeParser.y.cvs17
1 files changed, 13 insertions, 4 deletions
diff --git a/llvm/tools/llvm-upgrade/UpgradeParser.y.cvs b/llvm/tools/llvm-upgrade/UpgradeParser.y.cvs
index 8aa2beb1a74..fd1c293ec30 100644
--- a/llvm/tools/llvm-upgrade/UpgradeParser.y.cvs
+++ b/llvm/tools/llvm-upgrade/UpgradeParser.y.cvs
@@ -39,6 +39,7 @@ typedef std::vector<TypeInfo> TypeVector;
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 @@ ConstPool : ConstPool OptAssign TYPE TypesV {
$$ = 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;
OpenPOWER on IntegriCloud