File tree Expand file tree Collapse file tree 4 files changed +9
-17
lines changed Expand file tree Collapse file tree 4 files changed +9
-17
lines changed Original file line number Diff line number Diff line change @@ -1826,20 +1826,10 @@ class SyclKernelDecompMarker : public SyclKernelFieldHandler {
1826
1826
CollectionStack.back () = true ;
1827
1827
PointerStack.pop_back ();
1828
1828
} else if (PointerStack.pop_back_val ()) {
1829
- // FIXME: Stop triggering decomposition for non-trivial types with
1830
- // pointers
1831
- if (RD->isTrivial ()) {
1832
- PointerStack.back () = true ;
1833
- if (!RD->hasAttr <SYCLGenerateNewTypeAttr>())
1834
- RD->addAttr (
1835
- SYCLGenerateNewTypeAttr::CreateImplicit (SemaRef.getASTContext ()));
1836
- } else {
1837
- // We are visiting a non-trivial type with pointer.
1838
- CollectionStack.back () = true ;
1839
- if (!RD->hasAttr <SYCLRequiresDecompositionAttr>())
1840
- RD->addAttr (SYCLRequiresDecompositionAttr::CreateImplicit (
1841
- SemaRef.getASTContext ()));
1842
- }
1829
+ PointerStack.back () = true ;
1830
+ if (!RD->hasAttr <SYCLGenerateNewTypeAttr>())
1831
+ RD->addAttr (
1832
+ SYCLGenerateNewTypeAttr::CreateImplicit (SemaRef.getASTContext ()));
1843
1833
}
1844
1834
return true ;
1845
1835
}
Original file line number Diff line number Diff line change 5
5
class second_base {
6
6
public:
7
7
int *e;
8
+ second_base (int *E) : e(E) {}
8
9
};
9
10
10
11
class InnerFieldBase {
@@ -23,7 +24,7 @@ struct base {
23
24
24
25
struct derived : base, second_base {
25
26
int a;
26
-
27
+ derived () : second_base( nullptr ) {}
27
28
void operator ()() const {
28
29
}
29
30
};
Original file line number Diff line number Diff line change @@ -212,6 +212,6 @@ int main() {
212
212
myQueue.submit ([&](sycl::handler &h) {
213
213
h.single_task <class NonTrivialStructInBase >([=]() { return NonTrivialDerivedStructWithPtr.i ;});
214
214
});
215
- // CHECK: FunctionDecl {{.*}}NonTrivialStructInBase{{.*}} 'void (__wrapper_class, int, int )'
215
+ // CHECK: FunctionDecl {{.*}}NonTrivialStructInBase{{.*}} 'void (__generated_NonTrivialDerived )'
216
216
}
217
217
}
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ class third_base {
11
11
class second_base {
12
12
public:
13
13
int *e;
14
+ second_base (int *E) : e(E) {}
14
15
};
15
16
16
17
class InnerFieldBase {
@@ -29,7 +30,7 @@ struct base {
29
30
30
31
struct derived : base, second_base, third_base{
31
32
int a;
32
-
33
+ derived () : second_base( nullptr ) {}
33
34
void operator ()() const {
34
35
}
35
36
};
You can’t perform that action at this time.
0 commit comments