Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Basic/Targets/NVPTX.h
Show First 20 Lines • Show All 153 Lines • ▼ Show 20 Lines | public: | ||||
/// \returns If a target requires an address within a target specific address | /// \returns If a target requires an address within a target specific address | ||||
/// space \p AddressSpace to be converted in order to be used, then return the | /// space \p AddressSpace to be converted in order to be used, then return the | ||||
/// corresponding target specific DWARF address space. | /// corresponding target specific DWARF address space. | ||||
/// | /// | ||||
/// \returns Otherwise return None and no conversion will be emitted in the | /// \returns Otherwise return None and no conversion will be emitted in the | ||||
/// DWARF. | /// DWARF. | ||||
Optional<unsigned> | Optional<unsigned> | ||||
getDWARFAddressSpace(unsigned AddressSpace) const override { | getDWARFAddressSpace(unsigned AddressSpace) const override { | ||||
if (AddressSpace >= llvm::array_lengthof(NVPTXDWARFAddrSpaceMap) || | if (AddressSpace >= std::size(NVPTXDWARFAddrSpaceMap) || | ||||
NVPTXDWARFAddrSpaceMap[AddressSpace] < 0) | NVPTXDWARFAddrSpaceMap[AddressSpace] < 0) | ||||
return llvm::None; | return llvm::None; | ||||
return NVPTXDWARFAddrSpaceMap[AddressSpace]; | return NVPTXDWARFAddrSpaceMap[AddressSpace]; | ||||
} | } | ||||
CallingConvCheckResult checkCallingConvention(CallingConv CC) const override { | CallingConvCheckResult checkCallingConvention(CallingConv CC) const override { | ||||
// CUDA compilations support all of the host's calling conventions. | // CUDA compilations support all of the host's calling conventions. | ||||
// | // | ||||
Show All 12 Lines |