File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -1584,9 +1584,6 @@ class SyclKernelBodyCreator
1584
1584
}
1585
1585
1586
1586
void addStructInit (const CXXRecordDecl *RD) {
1587
- if (!RD)
1588
- return ;
1589
-
1590
1587
const ASTRecordLayout &Info =
1591
1588
SemaRef.getASTContext ().getASTRecordLayout (RD);
1592
1589
int NumberOfFields = Info.getFieldCount ();
@@ -1610,15 +1607,12 @@ class SyclKernelBodyCreator
1610
1607
1611
1608
QualType FieldTy = FD->getType ();
1612
1609
1610
+ const CXXRecordDecl *RD = FieldTy->getAsCXXRecordDecl ();
1611
+
1613
1612
// Kernel Object field is an array of structs. Handle struct array element.
1614
1613
if (const ConstantArrayType *CAT =
1615
- SemaRef.Context .getAsConstantArrayType (FieldTy)) {
1616
- CXXRecordDecl *RD = CAT->getElementType ()->getAsCXXRecordDecl ();
1617
- addStructInit (RD);
1618
- return true ;
1619
- }
1620
-
1621
- const CXXRecordDecl *RD = FieldTy->getAsCXXRecordDecl ();
1614
+ SemaRef.Context .getAsConstantArrayType (FieldTy))
1615
+ RD = CAT->getElementType ()->getAsCXXRecordDecl ();
1622
1616
1623
1617
// Initializers for accessors inside stream not added.
1624
1618
if (!Util::isSyclStreamType (FD->getType ()))
You can’t perform that action at this time.
0 commit comments