diff options
author | Nikita Popov <npopov@redhat.com> | 2025-08-15 18:06:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-15 18:06:07 +0200 |
commit | 01bc7421855889dcc3b10a131928e3a4a8e4b38c (patch) | |
tree | 80bbb9dd9cd8717e5d9bc654bceadad42164d907 /llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | |
parent | 1d1e52e614f95eed5ee440b43fa1992e46976629 (diff) | |
download | llvm-01bc7421855889dcc3b10a131928e3a4a8e4b38c.zip llvm-01bc7421855889dcc3b10a131928e3a4a8e4b38c.tar.gz llvm-01bc7421855889dcc3b10a131928e3a4a8e4b38c.tar.bz2 |
[CodeGen] Give ArgListEntry a proper constructor (NFC) (#153817)
This ensures that the required fields are set, and also makes the
construction more convenient.
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index 911bbab..ca10a6e 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -162,14 +162,13 @@ TargetLowering::makeLibCall(SelectionDAG &DAG, RTLIB::Libcall LC, EVT RetVT, TargetLowering::ArgListTy Args; Args.reserve(Ops.size()); - TargetLowering::ArgListEntry Entry; ArrayRef<Type *> OpsTypeOverrides = CallOptions.OpsTypeOverrides; for (unsigned i = 0; i < Ops.size(); ++i) { SDValue NewOp = Ops[i]; - Entry.Node = NewOp; - Entry.Ty = i < OpsTypeOverrides.size() && OpsTypeOverrides[i] + Type *Ty = i < OpsTypeOverrides.size() && OpsTypeOverrides[i] ? OpsTypeOverrides[i] - : Entry.Node.getValueType().getTypeForEVT(*DAG.getContext()); + : NewOp.getValueType().getTypeForEVT(*DAG.getContext()); + TargetLowering::ArgListEntry Entry(NewOp, Ty); Entry.IsSExt = shouldSignExtendTypeInLibCall(Entry.Ty, CallOptions.IsSigned); Entry.IsZExt = !Entry.IsSExt; @@ -10713,7 +10712,6 @@ SDValue TargetLowering::LowerToTLSEmulatedModel(const GlobalAddressSDNode *GA, SDLoc dl(GA); ArgListTy Args; - ArgListEntry Entry; const GlobalValue *GV = cast<GlobalValue>(GA->getGlobal()->stripPointerCastsAndAliases()); SmallString<32> NameString("__emutls_v."); @@ -10722,9 +10720,7 @@ SDValue TargetLowering::LowerToTLSEmulatedModel(const GlobalAddressSDNode *GA, const GlobalVariable *EmuTlsVar = GV->getParent()->getNamedGlobal(EmuTlsVarName); assert(EmuTlsVar && "Cannot find EmuTlsVar "); - Entry.Node = DAG.getGlobalAddress(EmuTlsVar, dl, PtrVT); - Entry.Ty = VoidPtrType; - Args.push_back(Entry); + Args.emplace_back(DAG.getGlobalAddress(EmuTlsVar, dl, PtrVT), VoidPtrType); SDValue EmuTlsGetAddr = DAG.getExternalSymbol("__emutls_get_address", PtrVT); |