File tree Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -1780,14 +1780,6 @@ class TargetInfo : public TransferrableTargetInfo,
17801780 return 0 ;
17811781 }
17821782
1783- // / \returns Target specific address space for indirect (e.g. sret) arguments.
1784- // / If such an address space exists, it must be convertible to and from the
1785- // / alloca address space. If it does not, std::nullopt is returned and the
1786- // / alloca address space will be used.
1787- virtual std::optional<unsigned > getIndirectArgAddressSpace () const {
1788- return std::nullopt ;
1789- }
1790-
17911783 // / \returns If a target requires an address within a target specific address
17921784 // / space \p AddressSpace to be converted in order to be used, then return the
17931785 // / corresponding target specific DWARF address space.
Original file line number Diff line number Diff line change @@ -1672,11 +1672,8 @@ CodeGenTypes::GetFunctionType(const CGFunctionInfo &FI) {
16721672
16731673 // Add type for sret argument.
16741674 if (IRFunctionArgs.hasSRetArg ()) {
1675- auto AddressSpace = CGM.getTarget ().getIndirectArgAddressSpace ();
1676- if (!AddressSpace)
1677- AddressSpace = getDataLayout ().getAllocaAddrSpace ();
1678- ArgTypes[IRFunctionArgs.getSRetArgNo ()] =
1679- llvm::PointerType::get (getLLVMContext (), *AddressSpace);
1675+ ArgTypes[IRFunctionArgs.getSRetArgNo ()] = llvm::PointerType::get (
1676+ getLLVMContext (), FI.getReturnInfo ().getIndirectAddrSpace ());
16801677 }
16811678
16821679 // Add type for inalloca argument.
You can’t perform that action at this time.
0 commit comments