[llvm-commits] [128368] From Duncan:

clattner at apple.com clattner at apple.com
Tue Jun 12 22:33:53 PDT 2007


Revision: 128368
Author:   clattner
Date:     2007-06-12 22:33:53 -0700 (Tue, 12 Jun 2007)

Log Message:
-----------
>From Duncan:

"When I got rid of the inreg attribute for static chain parameters,
I simply deleted the attribute adding code while I should have pushed
a attribute of "none" - this results in attributes for other parameters
being applied to the wrong parameters (off by one)."

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-12 15:31:10 UTC (rev 128367)
+++ apple-local/branches/llvm/gcc/llvm-types.cpp	2007-06-13 05:33:53 UTC (rev 128368)
@@ -1013,7 +1013,11 @@
     PAWI.index = Idx++; PAWI.attrs = ParamAttr::StructRet;
     Attrs.push_back(PAWI);
   }
-  
+
+  if (static_chain)
+    // Skip over the static chain.
+    Idx++;
+
   for (tree Args = TYPE_ARG_TYPES(type);
        Args && TREE_VALUE(Args) != void_type_node; Args = TREE_CHAIN(Args)) {
     tree Ty = TREE_VALUE(Args);





More information about the llvm-commits mailing list