================ @@ -8410,17 +8447,57 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI, InGlue = Chain.getValue(1); } + unsigned Opc = IsTailCall ? AArch64ISD::TC_RETURN : AArch64ISD::CALL; + std::vector<SDValue> Ops; Ops.push_back(Chain); Ops.push_back(Callee); + // Calls with operand bundle "clang.arc.attachedcall" are special. They should + // be expanded to the call, directly followed by a special marker sequence and + // a call to an ObjC library function. Use CALL_RVMARKER to do that. + if (CLI.CB && objcarc::hasAttachedCallOpBundle(CLI.CB)) { + assert(!IsTailCall && + "tail calls cannot be marked with clang.arc.attachedcall"); + Opc = AArch64ISD::CALL_RVMARKER; + + // Add a target global address for the retainRV/claimRV runtime function + // just before the call target. + Function *ARCFn = *objcarc::getAttachedARCFunction(CLI.CB); + auto GA = DAG.getTargetGlobalAddress(ARCFn, DL, PtrVT); + Ops.insert(Ops.begin() + 1, GA); + } else if (CallConv == CallingConv::ARM64EC_Thunk_X64) { + Opc = AArch64ISD::CALL_ARM64EC_TO_X64; + } else if (GuardWithBTI) ---------------- kovdan01 wrote:
Previous parts of if/else chain use braces, so use them here as well. See https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements: > readability is also harmed if an if/else chain does not use braced bodies for > either all or none of its members https://github.com/llvm/llvm-project/pull/85736 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits