On Thu, Jan 5, 2012 at 12:47 PM, Hatanaka, Akira <[email protected]> wrote:
> Please review the attached patch.
>
> I added comments and changed the type of ABIArgInfo's padding to llvm::Type*.

@@ -691,6 +691,9 @@
       // generally likes scalar values better than FCAs.
       llvm::Type *argType = argAI.getCoerceToType();
       if (llvm::StructType *st = dyn_cast<llvm::StructType>(argType)) {
+        // Insert a padding type to ensure proper alignment.
+        if (llvm::Type *PaddingType = argAI.getPaddingType())
+          argTypes.push_back(PaddingType);
         for (unsigned i = 0, e = st->getNumElements(); i != e; ++i)
           argTypes.push_back(st->getElementType(i));
       } else {

Shouldn't we be inserting the padding independent of whether the
following type is a struct type?

Looks fine otherwise.

-Eli
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to