Skip to content

Commit a5944b4

Browse files
committed
[SYCL] Minor changes
Signed-off-by: Mariya Podchishchaeva <[email protected]>
1 parent ce9fe95 commit a5944b4

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,7 @@ static CompoundStmt *CreateSYCLKernelBody(Sema &S,
472472
KernelObjClone, false, DeclarationNameInfo(),
473473
QualType(LC->getTypeForDecl(), 0), VK_LValue);
474474

475-
auto KernelFuncDecl = dyn_cast<FunctionDecl>(KernelDecl);
476-
assert(KernelFuncDecl && "No kernel function declaration?");
475+
auto KernelFuncDecl = cast<FunctionDecl>(KernelDecl);
477476
auto KernelFuncParam =
478477
KernelFuncDecl->param_begin(); // Iterator to ParamVarDecl (VarDecl)
479478
if (KernelFuncParam) {
@@ -510,7 +509,7 @@ static CompoundStmt *CreateSYCLKernelBody(Sema &S,
510509

511510
DeclAccessPair FieldDAP = DeclAccessPair::make(Field, AS_none);
512511
// [kenrel_obj or wrapper object].special_obj
513-
auto AccessorME = MemberExpr::Create(
512+
auto SpecialObjME = MemberExpr::Create(
514513
S.Context, Base, false, SourceLocation(), NestedNameSpecifierLoc(),
515514
SourceLocation(), Field, FieldDAP,
516515
DeclarationNameInfo(Field->getDeclName(), SourceLocation()),
@@ -519,7 +518,7 @@ static CompoundStmt *CreateSYCLKernelBody(Sema &S,
519518
// [kernel_obj or wrapper object].special_obj.__init
520519
DeclAccessPair MethodDAP = DeclAccessPair::make(InitMethod, AS_none);
521520
auto ME = MemberExpr::Create(
522-
S.Context, AccessorME, false, SourceLocation(),
521+
S.Context, SpecialObjME, false, SourceLocation(),
523522
NestedNameSpecifierLoc(), SourceLocation(), InitMethod, MethodDAP,
524523
InitMethod->getNameInfo(), nullptr, InitMethod->getType(),
525524
VK_LValue, OK_Ordinary);
@@ -597,9 +596,6 @@ static CompoundStmt *CreateSYCLKernelBody(Sema &S,
597596
if (Util::isSyclAccessorType(FieldType) ||
598597
Util::isSyclSamplerType(FieldType)) {
599598
getExprForSpecialSYCLObj(FieldType, Field, CRD, KernelObjCloneRef);
600-
} else if (Util::isSyclStreamType(FieldType)) {
601-
// TODO add support for streams
602-
llvm_unreachable("Streams not supported yet");
603599
} else if (CRD || FieldType->isScalarType()) {
604600
// If field has built-in or a structure/class type just initialize
605601
// this field with corresponding kernel argument using '=' binary

0 commit comments

Comments
 (0)