Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion clang/lib/Sema/SemaSYCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4691,7 +4691,9 @@ bool SYCLIntegrationFooter::emit(raw_ostream &OS) {
OS << "template<>\n";
OS << "inline const char *get_spec_constant_symbolic_ID<" << TopShim
<< ">() {\n";
OS << " return " << TopShim << ";\n";
OS << " return \"";
emitSpecIDName(OS, VD);
OS << "\";\n";
} else {
OS << "namespace sycl {\n";
OS << "namespace detail {\n";
Expand Down
20 changes: 10 additions & 10 deletions clang/test/CodeGenSYCL/anonymous_integration_footer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ struct S2 {
// CHECK-NEXT: namespace detail {
// CHECK-NEXT: template<>
// CHECK-NEXT: inline const char *get_spec_constant_symbolic_ID<::__sycl_detail::__spec_id_shim_[[SHIM_ID]]()>() {
// CHECK-NEXT: return ::__sycl_detail::__spec_id_shim_[[SHIM_ID]]();
// CHECK-NEXT: return "";
// CHECK-NEXT: }
// CHECK-NEXT: // namespace detail
// CHECK-NEXT: // namespace sycl
Expand Down Expand Up @@ -128,7 +128,7 @@ constexpr sycl::specialization_id same_name{7};
// CHECK-NEXT: namespace detail {
// CHECK-NEXT: template<>
// CHECK-NEXT: inline const char *get_spec_constant_symbolic_ID<::__sycl_detail::__spec_id_shim_[[SHIM_ID]]()>() {
// CHECK-NEXT: return ::__sycl_detail::__spec_id_shim_[[SHIM_ID]]();
// CHECK-NEXT: return "";
// CHECK-NEXT: }
// CHECK-NEXT: // namespace detail
// CHECK-NEXT: // namespace sycl
Expand All @@ -147,7 +147,7 @@ constexpr sycl::specialization_id same_name{8};
// CHECK-NEXT: namespace detail {
// CHECK-NEXT: template<>
// CHECK-NEXT: inline const char *get_spec_constant_symbolic_ID<::__sycl_detail::__spec_id_shim_[[SHIM_ID]]()>() {
// CHECK-NEXT: return ::__sycl_detail::__spec_id_shim_[[SHIM_ID]]();
// CHECK-NEXT: return "";
// CHECK-NEXT: }
// CHECK-NEXT: // namespace detail
// CHECK-NEXT: // namespace sycl
Expand All @@ -169,7 +169,7 @@ constexpr sycl::specialization_id same_name{9};
// CHECK-NEXT: namespace detail {
// CHECK-NEXT: template<>
// CHECK-NEXT: inline const char *get_spec_constant_symbolic_ID<::inner::__sycl_detail::__spec_id_shim_[[SHIM_ID]]()>() {
// CHECK-NEXT: return ::inner::__sycl_detail::__spec_id_shim_[[SHIM_ID]]();
// CHECK-NEXT: return "";
// CHECK-NEXT: }
// CHECK-NEXT: // namespace detail
// CHECK-NEXT: // namespace sycl
Expand Down Expand Up @@ -201,7 +201,7 @@ constexpr sycl::specialization_id same_name{11};
// CHECK-NEXT: namespace detail {
// CHECK-NEXT: template<>
// CHECK-NEXT: inline const char *get_spec_constant_symbolic_ID<::outer::__sycl_detail::__spec_id_shim_[[SHIM_ID]]()>() {
// CHECK-NEXT: return ::outer::__sycl_detail::__spec_id_shim_[[SHIM_ID]]();
// CHECK-NEXT: return "";
// CHECK-NEXT: }
// CHECK-NEXT: // namespace detail
// CHECK-NEXT: // namespace sycl
Expand All @@ -221,7 +221,7 @@ constexpr sycl::specialization_id same_name{12};
// CHECK-NEXT: namespace detail {
// CHECK-NEXT: template<>
// CHECK-NEXT: inline const char *get_spec_constant_symbolic_ID<::outer::__sycl_detail::__spec_id_shim_[[SHIM_ID]]()>() {
// CHECK-NEXT: return ::outer::__sycl_detail::__spec_id_shim_[[SHIM_ID]]();
// CHECK-NEXT: return "";
// CHECK-NEXT: }
// CHECK-NEXT: // namespace detail
// CHECK-NEXT: // namespace sycl
Expand Down Expand Up @@ -257,7 +257,7 @@ constexpr sycl::specialization_id same_name{13};
// CHECK-NEXT: namespace detail {
// CHECK-NEXT: template<>
// CHECK-NEXT: inline const char *get_spec_constant_symbolic_ID<::outer::__sycl_detail::__spec_id_shim_[[SHIM_ID_2]]()>() {
// CHECK-NEXT: return ::outer::__sycl_detail::__spec_id_shim_[[SHIM_ID_2]]();
// CHECK-NEXT: return "";
// CHECK-NEXT: }
// CHECK-NEXT: // namespace detail
// CHECK-NEXT: // namespace sycl
Expand All @@ -280,7 +280,7 @@ constexpr sycl::specialization_id same_name{14};
// CHECK-NEXT: namespace detail {
// CHECK-NEXT: template<>
// CHECK-NEXT: inline const char *get_spec_constant_symbolic_ID<::__sycl_detail::__spec_id_shim_[[SHIM_ID]]()>() {
// CHECK-NEXT: return ::__sycl_detail::__spec_id_shim_[[SHIM_ID]]();
// CHECK-NEXT: return "";
// CHECK-NEXT: }
// CHECK-NEXT: // namespace detail
// CHECK-NEXT: // namespace sycl
Expand Down Expand Up @@ -309,7 +309,7 @@ constexpr sycl::specialization_id same_name{15};
// CHECK-NEXT: namespace detail {
// CHECK-NEXT: template<>
// CHECK-NEXT: inline const char *get_spec_constant_symbolic_ID<::__sycl_detail::__spec_id_shim_[[SHIM_ID2]]()>() {
// CHECK-NEXT: return ::__sycl_detail::__spec_id_shim_[[SHIM_ID2]]();
// CHECK-NEXT: return "";
// CHECK-NEXT: }
// CHECK-NEXT: // namespace detail
// CHECK-NEXT: // namespace sycl
Expand Down Expand Up @@ -337,7 +337,7 @@ constexpr sycl::specialization_id same_name{16};
// CHECK-NEXT: namespace detail {
// CHECK-NEXT: template<>
// CHECK-NEXT: inline const char *get_spec_constant_symbolic_ID<::__sycl_detail::__spec_id_shim_[[SHIM_ID2]]()>() {
// CHECK-NEXT: return ::__sycl_detail::__spec_id_shim_[[SHIM_ID2]]();
// CHECK-NEXT: return "";
// CHECK-NEXT: }
// CHECK-NEXT: // namespace detail
// CHECK-NEXT: // namespace sycl
Expand Down
6 changes: 3 additions & 3 deletions clang/test/CodeGenSYCL/anonymous_integration_footer2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ constexpr sycl::specialization_id same_name{207};
// CHECK-NEXT: namespace detail {
// CHECK-NEXT: template<>
// CHECK-NEXT: inline const char *get_spec_constant_symbolic_ID<::__sycl_detail::__spec_id_shim_[[SHIM_ID]]()>() {
// CHECK-NEXT: return ::__sycl_detail::__spec_id_shim_[[SHIM_ID]]();
// CHECK-NEXT: return "";
// CHECK-NEXT: }
// CHECK-NEXT: // namespace detail
// CHECK-NEXT: // namespace sycl
Expand All @@ -102,7 +102,7 @@ constexpr sycl::specialization_id same_name{208};
// CHECK-NEXT: namespace detail {
// CHECK-NEXT: template<>
// CHECK-NEXT: inline const char *get_spec_constant_symbolic_ID<::__sycl_detail::__spec_id_shim_[[SHIM_ID]]()>() {
// CHECK-NEXT: return ::__sycl_detail::__spec_id_shim_[[SHIM_ID]]();
// CHECK-NEXT: return "";
// CHECK-NEXT: }
// CHECK-NEXT: // namespace detail
// CHECK-NEXT: // namespace sycl
Expand All @@ -127,7 +127,7 @@ constexpr sycl::specialization_id same_name{209};
// CHECK-NEXT: namespace detail {
// CHECK-NEXT: template<>
// CHECK-NEXT: inline const char *get_spec_constant_symbolic_ID<::outer::inner::__sycl_detail::__spec_id_shim_[[SHIM_ID]]()>() {
// CHECK-NEXT: return ::outer::inner::__sycl_detail::__spec_id_shim_[[SHIM_ID]]();
// CHECK-NEXT: return "";
// CHECK-NEXT: }
// CHECK-NEXT: // namespace detail
// CHECK-NEXT: // namespace sycl
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/integration_footer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ specialization_id<int> AnonNSSpecID;
// CHECK-NEXT: namespace detail {
// CHECK-NEXT: template<>
// CHECK-NEXT: inline const char *get_spec_constant_symbolic_ID<::Foo::__sycl_detail::__spec_id_shim_[[SHIM0]]()>() {
// CHECK-NEXT: return ::Foo::__sycl_detail::__spec_id_shim_[[SHIM0]]();
// CHECK-NEXT: return "";
// CHECK-NEXT: }
// CHECK-NEXT: } // namespace detail
// CHECK-NEXT: } // namespace sycl
Expand Down