@@ -472,8 +472,7 @@ static CompoundStmt *CreateSYCLKernelBody(Sema &S,
472
472
KernelObjClone, false , DeclarationNameInfo (),
473
473
QualType (LC->getTypeForDecl (), 0 ), VK_LValue);
474
474
475
- auto KernelFuncDecl = dyn_cast<FunctionDecl>(KernelDecl);
476
- assert (KernelFuncDecl && " No kernel function declaration?" );
475
+ auto KernelFuncDecl = cast<FunctionDecl>(KernelDecl);
477
476
auto KernelFuncParam =
478
477
KernelFuncDecl->param_begin (); // Iterator to ParamVarDecl (VarDecl)
479
478
if (KernelFuncParam) {
@@ -510,7 +509,7 @@ static CompoundStmt *CreateSYCLKernelBody(Sema &S,
510
509
511
510
DeclAccessPair FieldDAP = DeclAccessPair::make (Field, AS_none);
512
511
// [kenrel_obj or wrapper object].special_obj
513
- auto AccessorME = MemberExpr::Create (
512
+ auto SpecialObjME = MemberExpr::Create (
514
513
S.Context , Base, false , SourceLocation (), NestedNameSpecifierLoc (),
515
514
SourceLocation (), Field, FieldDAP,
516
515
DeclarationNameInfo (Field->getDeclName (), SourceLocation ()),
@@ -519,7 +518,7 @@ static CompoundStmt *CreateSYCLKernelBody(Sema &S,
519
518
// [kernel_obj or wrapper object].special_obj.__init
520
519
DeclAccessPair MethodDAP = DeclAccessPair::make (InitMethod, AS_none);
521
520
auto ME = MemberExpr::Create (
522
- S.Context , AccessorME , false , SourceLocation (),
521
+ S.Context , SpecialObjME , false , SourceLocation (),
523
522
NestedNameSpecifierLoc (), SourceLocation (), InitMethod, MethodDAP,
524
523
InitMethod->getNameInfo (), nullptr , InitMethod->getType (),
525
524
VK_LValue, OK_Ordinary);
@@ -597,9 +596,6 @@ static CompoundStmt *CreateSYCLKernelBody(Sema &S,
597
596
if (Util::isSyclAccessorType (FieldType) ||
598
597
Util::isSyclSamplerType (FieldType)) {
599
598
getExprForSpecialSYCLObj (FieldType, Field, CRD, KernelObjCloneRef);
600
- } else if (Util::isSyclStreamType (FieldType)) {
601
- // TODO add support for streams
602
- llvm_unreachable (" Streams not supported yet" );
603
599
} else if (CRD || FieldType->isScalarType ()) {
604
600
// If field has built-in or a structure/class type just initialize
605
601
// this field with corresponding kernel argument using '=' binary
0 commit comments