Skip to content

Commit 14e9394

Browse files
committed
[SYCL] Add support for union types as kernel arguments
Signed-off-by: Soumi Manna <[email protected]>
1 parent 1dd8c85 commit 14e9394

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -941,8 +941,8 @@ class KernelObjVisitor {
941941
else if (FieldTy->isArrayType()) {
942942
if (KF_FOR_EACH(handleArrayType, Field, FieldTy))
943943
VisitArrayElements(Field, FieldTy, handlers...);
944-
} else if (FieldTy->isScalarType() || FieldTy->isVectorType() ||
945-
FieldTy->isUnionType())
944+
} else if (FieldTy->isScalarType() || FieldTy->isUnionType() ||
945+
FieldTy->isVectorType())
946946
KF_FOR_EACH(handleSimpleType, Field, FieldTy);
947947
else
948948
KF_FOR_EACH(handleOtherType, Field, FieldTy);

clang/test/CodeGenSYCL/union_kernel_param.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,3 @@ bool test0() {
5555
});
5656
}
5757
}
58-

0 commit comments

Comments
 (0)