From cfca06d7963fa0909f90483b42a6d7d194d01e08 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 26 Jul 2020 19:36:28 +0000 Subject: Vendor import of llvm-project master 2e10b7a39b9, the last commit before the llvmorg-12-init tag, from which release/11.x was branched. --- llvm/utils/TableGen/CallingConvEmitter.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'llvm/utils/TableGen/CallingConvEmitter.cpp') diff --git a/llvm/utils/TableGen/CallingConvEmitter.cpp b/llvm/utils/TableGen/CallingConvEmitter.cpp index 9eabb44d9004..a4e993f80ec9 100644 --- a/llvm/utils/TableGen/CallingConvEmitter.cpp +++ b/llvm/utils/TableGen/CallingConvEmitter.cpp @@ -197,11 +197,12 @@ void CallingConvEmitter::EmitAction(Record *Action, "getTypeAllocSize(EVT(LocVT).getTypeForEVT(State.getContext()))," " "; if (Align) - O << Align; + O << "Align(" << Align << ")"; else - O << "\n" << IndentStr + O << "\n" + << IndentStr << " State.getMachineFunction().getDataLayout()." - "getABITypeAlignment(EVT(LocVT).getTypeForEVT(State.getContext()" + "getABITypeAlign(EVT(LocVT).getTypeForEVT(State.getContext()" "))"; O << ");\n" << IndentStr << "State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset" @@ -224,8 +225,7 @@ void CallingConvEmitter::EmitAction(Record *Action, O << "\n" << IndentStr << "};\n"; O << IndentStr << "unsigned Offset" << ++Counter - << " = State.AllocateStack(" - << Size << ", " << Align << ", " + << " = State.AllocateStack(" << Size << ", Align(" << Align << "), " << "ShadowRegList" << ShadowRegListNumber << ");\n"; O << IndentStr << "State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset" << Counter << ", LocVT, LocInfo));\n"; @@ -275,9 +275,8 @@ void CallingConvEmitter::EmitAction(Record *Action, } else if (Action->isSubClassOf("CCPassByVal")) { int Size = Action->getValueAsInt("Size"); int Align = Action->getValueAsInt("Align"); - O << IndentStr - << "State.HandleByVal(ValNo, ValVT, LocVT, LocInfo, " - << Size << ", " << Align << ", ArgFlags);\n"; + O << IndentStr << "State.HandleByVal(ValNo, ValVT, LocVT, LocInfo, " + << Size << ", Align(" << Align << "), ArgFlags);\n"; O << IndentStr << "return false;\n"; } else if (Action->isSubClassOf("CCCustom")) { O << IndentStr -- cgit v1.2.3