[llvm-commits] [128564] Use new attribute helper, no functionality change.

clattner at apple.com clattner at apple.com
Mon Jun 18 14:51:50 PDT 2007


Revision: 128564
Author:   clattner
Date:     2007-06-18 14:51:50 -0700 (Mon, 18 Jun 2007)

Log Message:
-----------
Use new attribute helper, no functionality change.

Modified Paths:
--------------
    apple-local/branches/llvm/gcc/llvm-types.cpp

Modified: apple-local/branches/llvm/gcc/llvm-types.cpp
===================================================================
--- apple-local/branches/llvm/gcc/llvm-types.cpp	2007-06-18 19:37:02 UTC (rev 128563)
+++ apple-local/branches/llvm/gcc/llvm-types.cpp	2007-06-18 21:51:50 UTC (rev 128564)
@@ -991,10 +991,8 @@
           RAttributes |= ParamAttr::SExt;
     }
   }
-  if (RAttributes != ParamAttr::None) {
-    ParamAttrsWithIndex PAWI; PAWI.index = 0; PAWI.attrs = RAttributes;
-    Attrs.push_back(PAWI);
-  }
+  if (RAttributes != ParamAttr::None)
+    Attrs.push_back(ParamAttrsWithIndex::get(0, RAttributes));
   
   unsigned Idx = 1;
   bool isFirstArg = true;
@@ -1008,11 +1006,8 @@
   // parameter but that parameter may have other attributes too so we set up
   // the first Attributes value here based on struct return. This only works
   // Handle the structure return calling convention
-  if (ABIConverter.isStructReturn()) {
-    ParamAttrsWithIndex PAWI; 
-    PAWI.index = Idx++; PAWI.attrs = ParamAttr::StructRet;
-    Attrs.push_back(PAWI);
-  }
+  if (ABIConverter.isStructReturn())
+    Attrs.push_back(ParamAttrsWithIndex::get(Idx++, ParamAttr::StructRet));
 
   if (static_chain)
     // Skip over the static chain.
@@ -1042,10 +1037,8 @@
                                     isVarArg, lparam);
 #endif // LLVM_TARGET_ENABLE_REGPARM
 
-    if (Attributes != ParamAttr::None) {
-     ParamAttrsWithIndex PAWI; PAWI.index = Idx; PAWI.attrs = Attributes;
-     Attrs.push_back(PAWI);
-    }
+    if (Attributes != ParamAttr::None)
+      Attrs.push_back(ParamAttrsWithIndex::get(Idx, Attributes));
     Idx++;
   }
 





More information about the llvm-commits mailing list