Skip to content

Commit 904b92a

Browse files
committed
rebase the code after NFC patch landed
1 parent a404747 commit 904b92a

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9103,24 +9103,23 @@ std::pair<SDValue, SDValue> SelectionDAG::getStrlen(SDValue Chain,
91039103
return {};
91049104

91059105
// Emit a library call.
9106-
auto GetEntry = [](Type *Ty, SDValue &SDV) {
9107-
TargetLowering::ArgListEntry E;
9108-
E.Ty = Ty;
9109-
E.Node = SDV;
9110-
return E;
9111-
};
91129106

91139107
PointerType *PT = PointerType::getUnqual(*getContext());
9114-
TargetLowering::ArgListTy Args = {GetEntry(PT, Src)};
9108+
TargetLowering::ArgListTy Args = {{Src, PT}};
91159109

91169110
TargetLowering::CallLoweringInfo CLI(*this);
9111+
bool IsTailCall =
9112+
isInTailCallPositionWrapper(CI, this, /*AllowReturnsFirstArg*/ true);
91179113

91189114
// TODO: propagate tail call flag for targets where that is safe. Note
91199115
// that it is not safe on AIX which is the only current target.
9120-
CLI.setDebugLoc(dl).setChain(Chain).setLibCallee(
9121-
TLI->getLibcallCallingConv(RTLIB::STRLEN), CI->getType(),
9122-
getExternalSymbol(LibCallName, TLI->getProgramPointerTy(getDataLayout())),
9123-
std::move(Args));
9116+
CLI.setDebugLoc(dl)
9117+
.setChain(Chain)
9118+
.setLibCallee(TLI->getLibcallCallingConv(RTLIB::STRLEN), CI->getType(),
9119+
getExternalSymbol(
9120+
LibCallName, TLI->getProgramPointerTy(getDataLayout())),
9121+
std::move(Args))
9122+
.setTailCall(IsTailCall);
91249123

91259124
return TLI->LowerCallTo(CLI);
91269125
}

0 commit comments

Comments
 (0)