[llvm-commits] CVS: llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs UpgradeParser.y UpgradeParser.y.cvs

Reid Spencer reid at x10sys.com
Tue Apr 10 19:44:53 PDT 2007



Changes in directory llvm/tools/llvm-upgrade:

UpgradeParser.cpp.cvs updated: 1.73 -> 1.74
UpgradeParser.y updated: 1.79 -> 1.80
UpgradeParser.y.cvs updated: 1.72 -> 1.73
---
Log message:

For PR1146: http://llvm.org/PR1146 :
Put the parameter attributes in their own ParamAttr name space. Adjust the
rest of llvm as a result.


---
Diffs of the changes:  (+24 -24)

 UpgradeParser.cpp.cvs |   16 ++++++++--------
 UpgradeParser.y       |   16 ++++++++--------
 UpgradeParser.y.cvs   |   16 ++++++++--------
 3 files changed, 24 insertions(+), 24 deletions(-)


Index: llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs
diff -u llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs:1.73 llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs:1.74
--- llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs:1.73	Mon Apr  9 01:16:21 2007
+++ llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs	Tue Apr 10 21:44:19 2007
@@ -748,7 +748,7 @@
     PAL2 = *F2->getParamAttrs();
   if (PAL1.getParamAttrs(0) != PAL2.getParamAttrs(0))
     return false;
-  unsigned SRetMask = ~unsigned(StructRetAttribute);
+  unsigned SRetMask = ~unsigned(ParamAttr::StructRet);
   for (unsigned i = 0; i < F1->getNumParams(); ++i) {
     if (F1->getParamType(i) != F2->getParamType(i) ||
         unsigned(PAL1.getParamAttrs(i+1)) & SRetMask !=
@@ -793,7 +793,7 @@
     const FunctionType *FT2 = dyn_cast<FunctionType>(PF2->getElementType());
     if (FT1 && FT2 && FuncTysDifferOnlyBySRet(FT1, FT2)) {
       const ParamAttrsList *PAL2 = FT2->getParamAttrs();
-      if (PAL2 && PAL2->paramHasAttr(1, StructRetAttribute))
+      if (PAL2 && PAL2->paramHasAttr(1, ParamAttr::StructRet))
         return V;
       else if (Constant *C = dyn_cast<Constant>(V))
         return ConstantExpr::getBitCast(C, PF1);
@@ -5389,8 +5389,8 @@
     ParamAttrsList *ParamAttrs = 0;
     if ((yyvsp[-7].UIntVal) == OldCallingConv::CSRet) {
       ParamAttrs = new ParamAttrsList();
-      ParamAttrs->addAttributes(0, NoAttributeSet);     // result
-      ParamAttrs->addAttributes(1, StructRetAttribute); // first arg
+      ParamAttrs->addAttributes(0, ParamAttr::None);     // result
+      ParamAttrs->addAttributes(1, ParamAttr::StructRet); // first arg
     }
 
     const FunctionType *FT = 
@@ -5867,8 +5867,8 @@
       ParamAttrsList *ParamAttrs = 0;
       if ((yyvsp[-11].UIntVal) == OldCallingConv::CSRet) {
         ParamAttrs = new ParamAttrsList();
-        ParamAttrs->addAttributes(0, NoAttributeSet);      // Function result
-        ParamAttrs->addAttributes(1, StructRetAttribute);  // first param
+        ParamAttrs->addAttributes(0, ParamAttr::None);      // Function result
+        ParamAttrs->addAttributes(1, ParamAttr::StructRet);  // first param
       }
       bool isVarArg = ParamTypes.size() && ParamTypes.back() == Type::VoidTy;
       if (isVarArg) ParamTypes.pop_back();
@@ -6369,8 +6369,8 @@
       ParamAttrsList *ParamAttrs = 0;
       if ((yyvsp[-5].UIntVal) == OldCallingConv::CSRet) {
         ParamAttrs = new ParamAttrsList();
-        ParamAttrs->addAttributes(0, NoAttributeSet);     // function result
-        ParamAttrs->addAttributes(1, StructRetAttribute); // first parameter
+        ParamAttrs->addAttributes(0, ParamAttr::None);     // function result
+        ParamAttrs->addAttributes(1, ParamAttr::StructRet); // first parameter
       }
 
       FTy = FunctionType::get(RetTy, ParamTypes, isVarArg, ParamAttrs);


Index: llvm/tools/llvm-upgrade/UpgradeParser.y
diff -u llvm/tools/llvm-upgrade/UpgradeParser.y:1.79 llvm/tools/llvm-upgrade/UpgradeParser.y:1.80
--- llvm/tools/llvm-upgrade/UpgradeParser.y:1.79	Mon Apr  9 01:15:59 2007
+++ llvm/tools/llvm-upgrade/UpgradeParser.y	Tue Apr 10 21:44:20 2007
@@ -388,7 +388,7 @@
     PAL2 = *F2->getParamAttrs();
   if (PAL1.getParamAttrs(0) != PAL2.getParamAttrs(0))
     return false;
-  unsigned SRetMask = ~unsigned(StructRetAttribute);
+  unsigned SRetMask = ~unsigned(ParamAttr::StructRet);
   for (unsigned i = 0; i < F1->getNumParams(); ++i) {
     if (F1->getParamType(i) != F2->getParamType(i) ||
         unsigned(PAL1.getParamAttrs(i+1)) & SRetMask !=
@@ -433,7 +433,7 @@
     const FunctionType *FT2 = dyn_cast<FunctionType>(PF2->getElementType());
     if (FT1 && FT2 && FuncTysDifferOnlyBySRet(FT1, FT2)) {
       const ParamAttrsList *PAL2 = FT2->getParamAttrs();
-      if (PAL2 && PAL2->paramHasAttr(1, StructRetAttribute))
+      if (PAL2 && PAL2->paramHasAttr(1, ParamAttr::StructRet))
         return V;
       else if (Constant *C = dyn_cast<Constant>(V))
         return ConstantExpr::getBitCast(C, PF1);
@@ -2904,8 +2904,8 @@
     ParamAttrsList *ParamAttrs = 0;
     if ($1 == OldCallingConv::CSRet) {
       ParamAttrs = new ParamAttrsList();
-      ParamAttrs->addAttributes(0, NoAttributeSet);     // result
-      ParamAttrs->addAttributes(1, StructRetAttribute); // first arg
+      ParamAttrs->addAttributes(0, ParamAttr::None);     // result
+      ParamAttrs->addAttributes(1, ParamAttr::StructRet); // first arg
     }
 
     const FunctionType *FT = 
@@ -3293,8 +3293,8 @@
       ParamAttrsList *ParamAttrs = 0;
       if ($2 == OldCallingConv::CSRet) {
         ParamAttrs = new ParamAttrsList();
-        ParamAttrs->addAttributes(0, NoAttributeSet);      // Function result
-        ParamAttrs->addAttributes(1, StructRetAttribute);  // first param
+        ParamAttrs->addAttributes(0, ParamAttr::None);      // Function result
+        ParamAttrs->addAttributes(1, ParamAttr::StructRet);  // first param
       }
       bool isVarArg = ParamTypes.size() && ParamTypes.back() == Type::VoidTy;
       if (isVarArg) ParamTypes.pop_back();
@@ -3698,8 +3698,8 @@
       ParamAttrsList *ParamAttrs = 0;
       if ($2 == OldCallingConv::CSRet) {
         ParamAttrs = new ParamAttrsList();
-        ParamAttrs->addAttributes(0, NoAttributeSet);     // function result
-        ParamAttrs->addAttributes(1, StructRetAttribute); // first parameter
+        ParamAttrs->addAttributes(0, ParamAttr::None);     // function result
+        ParamAttrs->addAttributes(1, ParamAttr::StructRet); // first parameter
       }
 
       FTy = FunctionType::get(RetTy, ParamTypes, isVarArg, ParamAttrs);


Index: llvm/tools/llvm-upgrade/UpgradeParser.y.cvs
diff -u llvm/tools/llvm-upgrade/UpgradeParser.y.cvs:1.72 llvm/tools/llvm-upgrade/UpgradeParser.y.cvs:1.73
--- llvm/tools/llvm-upgrade/UpgradeParser.y.cvs:1.72	Mon Apr  9 01:16:21 2007
+++ llvm/tools/llvm-upgrade/UpgradeParser.y.cvs	Tue Apr 10 21:44:20 2007
@@ -388,7 +388,7 @@
     PAL2 = *F2->getParamAttrs();
   if (PAL1.getParamAttrs(0) != PAL2.getParamAttrs(0))
     return false;
-  unsigned SRetMask = ~unsigned(StructRetAttribute);
+  unsigned SRetMask = ~unsigned(ParamAttr::StructRet);
   for (unsigned i = 0; i < F1->getNumParams(); ++i) {
     if (F1->getParamType(i) != F2->getParamType(i) ||
         unsigned(PAL1.getParamAttrs(i+1)) & SRetMask !=
@@ -433,7 +433,7 @@
     const FunctionType *FT2 = dyn_cast<FunctionType>(PF2->getElementType());
     if (FT1 && FT2 && FuncTysDifferOnlyBySRet(FT1, FT2)) {
       const ParamAttrsList *PAL2 = FT2->getParamAttrs();
-      if (PAL2 && PAL2->paramHasAttr(1, StructRetAttribute))
+      if (PAL2 && PAL2->paramHasAttr(1, ParamAttr::StructRet))
         return V;
       else if (Constant *C = dyn_cast<Constant>(V))
         return ConstantExpr::getBitCast(C, PF1);
@@ -2904,8 +2904,8 @@
     ParamAttrsList *ParamAttrs = 0;
     if ($1 == OldCallingConv::CSRet) {
       ParamAttrs = new ParamAttrsList();
-      ParamAttrs->addAttributes(0, NoAttributeSet);     // result
-      ParamAttrs->addAttributes(1, StructRetAttribute); // first arg
+      ParamAttrs->addAttributes(0, ParamAttr::None);     // result
+      ParamAttrs->addAttributes(1, ParamAttr::StructRet); // first arg
     }
 
     const FunctionType *FT = 
@@ -3293,8 +3293,8 @@
       ParamAttrsList *ParamAttrs = 0;
       if ($2 == OldCallingConv::CSRet) {
         ParamAttrs = new ParamAttrsList();
-        ParamAttrs->addAttributes(0, NoAttributeSet);      // Function result
-        ParamAttrs->addAttributes(1, StructRetAttribute);  // first param
+        ParamAttrs->addAttributes(0, ParamAttr::None);      // Function result
+        ParamAttrs->addAttributes(1, ParamAttr::StructRet);  // first param
       }
       bool isVarArg = ParamTypes.size() && ParamTypes.back() == Type::VoidTy;
       if (isVarArg) ParamTypes.pop_back();
@@ -3698,8 +3698,8 @@
       ParamAttrsList *ParamAttrs = 0;
       if ($2 == OldCallingConv::CSRet) {
         ParamAttrs = new ParamAttrsList();
-        ParamAttrs->addAttributes(0, NoAttributeSet);     // function result
-        ParamAttrs->addAttributes(1, StructRetAttribute); // first parameter
+        ParamAttrs->addAttributes(0, ParamAttr::None);     // function result
+        ParamAttrs->addAttributes(1, ParamAttr::StructRet); // first parameter
       }
 
       FTy = FunctionType::get(RetTy, ParamTypes, isVarArg, ParamAttrs);






More information about the llvm-commits mailing list