diff options
| author | 2019-09-01 16:27:59 +0000 | |
|---|---|---|
| committer | 2019-09-01 16:27:59 +0000 | |
| commit | b19884b112052f3bf5ff9551374fbd840e2339f2 (patch) | |
| tree | 9e4127bb2a982bb6f8c89d0d7b393e3fac3aee2c /gnu/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp | |
| parent | Add amlmmc(4), a driver for the SD/MMC controller found on various (diff) | |
| download | wireguard-openbsd-b19884b112052f3bf5ff9551374fbd840e2339f2.tar.xz wireguard-openbsd-b19884b112052f3bf5ff9551374fbd840e2339f2.zip | |
Import LLVM 8.0.1 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp')
| -rw-r--r-- | gnu/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gnu/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp b/gnu/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp index 003848e3422..f7f29d85cbb 100644 --- a/gnu/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp +++ b/gnu/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp @@ -669,13 +669,16 @@ WebAssemblyTargetLowering::LowerCall(CallLoweringInfo &CLI, if (IsVarArg) { // Outgoing non-fixed arguments are placed in a buffer. First // compute their offsets and the total amount of buffer space needed. - for (SDValue Arg : - make_range(OutVals.begin() + NumFixedArgs, OutVals.end())) { + for (unsigned I = NumFixedArgs; I < Outs.size(); ++I) { + const ISD::OutputArg &Out = Outs[I]; + SDValue &Arg = OutVals[I]; EVT VT = Arg.getValueType(); assert(VT != MVT::iPTR && "Legalized args should be concrete"); Type *Ty = VT.getTypeForEVT(*DAG.getContext()); + unsigned Align = std::max(Out.Flags.getOrigAlign(), + Layout.getABITypeAlignment(Ty)); unsigned Offset = CCInfo.AllocateStack(Layout.getTypeAllocSize(Ty), - Layout.getABITypeAlignment(Ty)); + Align); CCInfo.addLoc(CCValAssign::getMem(ArgLocs.size(), VT.getSimpleVT(), Offset, VT.getSimpleVT(), CCValAssign::Full)); |
