diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2012-01-09 19:08:06 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2012-01-09 19:08:06 +0000 |
commit | 4ba3fd45bb134e4a5119f297537adce4e7ef4a39 (patch) | |
tree | 449ee482caf9618e6498a636a9d78fada70c8714 /lib/CodeGen/CGCall.cpp | |
parent | 80a5b27fe4dfccef0c539ac5c4a7ea17a1649085 (diff) |
Move the piece of code up that skips the padding argument. Without this change,
padding insertion will not work if the coerced type is not a structure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147786 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index 962339ab77..72b40d3d59 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -988,6 +988,10 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI, case ABIArgInfo::Extend: case ABIArgInfo::Direct: { + // Skip the dummy padding argument. + if (ArgI.getPaddingType()) + ++AI; + // If we have the trivial case, handle it with no muss and fuss. if (!isa<llvm::StructType>(ArgI.getCoerceToType()) && ArgI.getCoerceToType() == ConvertType(Ty) && @@ -1030,10 +1034,6 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI, llvm::PointerType::getUnqual(ArgI.getCoerceToType())); } - // Skip the dummy padding argument. - if (ArgI.getPaddingType()) - ++AI; - // If the coerce-to type is a first class aggregate, we flatten it and // pass the elements. Either way is semantically identical, but fast-isel // and the optimizer generally likes scalar values better than FCAs. |