Skip to content

Commit 0f724f8

Browse files
committed
Align AMDGPU argument classification.
1 parent f6c8e01 commit 0f724f8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clang/lib/CodeGen/Targets/AMDGPU.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,8 @@ ABIArgInfo AMDGPUABIInfo::classifyArgumentType(QualType Ty, bool Variadic,
225225
// Records with non-trivial destructors/copy-constructors should not be
226226
// passed by value.
227227
if (auto RAA = getRecordArgABI(Ty, getCXXABI()))
228-
return getNaturalAlignIndirect(
229-
Ty, getContext().getTargetAddressSpace(LangAS::Default),
230-
RAA == CGCXXABI::RAA_DirectInMemory);
228+
return getNaturalAlignIndirect(Ty, getDataLayout().getAllocaAddrSpace(),
229+
RAA == CGCXXABI::RAA_DirectInMemory);
231230

232231
// Ignore empty structs/unions.
233232
if (isEmptyRecord(getContext(), Ty, true))

0 commit comments

Comments
 (0)