Skip to content

Commit fa0f7c4

Browse files
author
Victor Lomuller
committed
Merge branch 'sycl' into work_group_static
2 parents b95ecfd + 1873789 commit fa0f7c4

File tree

3 files changed

+38
-6
lines changed

3 files changed

+38
-6
lines changed

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6991,6 +6991,7 @@ bool SYCLIntegrationFooter::emit(raw_ostream &OS) {
69916991
Policy.adjustForCPlusPlusFwdDecl();
69926992
Policy.SuppressTypedefs = true;
69936993
Policy.SuppressUnwrittenScope = true;
6994+
Policy.PrintCanonicalTypes = true;
69946995

69956996
llvm::SmallSet<const VarDecl *, 8> Visited;
69966997
bool EmittedFirstSpecConstant = false;
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown -fsycl-int-footer=%t.footer.h -emit-llvm %s -o -
2+
// RUN: FileCheck -input-file=%t.footer.h %s --check-prefix=CHECK-FOOTER
3+
4+
// This test checks that integration footer is emitted correctly when a
5+
// device_global has an explicit template specialization in template arguments.
6+
7+
#include "sycl.hpp"
8+
9+
namespace sycl {
10+
template <typename T> struct X {};
11+
template <> struct X<int> {};
12+
namespace detail {
13+
struct Y {};
14+
} // namespace detail
15+
template <> struct X<detail::Y> {};
16+
} // namespace sycl
17+
18+
using namespace sycl;
19+
template <typename T, typename = X<detail::Y>> struct Arg1 { T val; };
20+
21+
using namespace sycl::ext::oneapi;
22+
template <typename properties_t>
23+
device_global<properties_t> dev_global;
24+
25+
SYCL_EXTERNAL auto foo() {
26+
(void)dev_global<Arg1<int>>;
27+
}
28+
29+
// CHECK-FOOTER: __sycl_device_global_registration::__sycl_device_global_registration() noexcept {
30+
// CHECK-FOOTER-NEXT: device_global_map::add((void *)&::dev_global<Arg1<int, sycl::X<sycl::detail::Y>>>, "_Z10dev_globalI4Arg1IiN4sycl1XINS1_6detail1YEEEEE");
31+
// CHECK-FOOTER-NEXT: }
32+
// CHECK-FOOTER-NEXT: } // namespace (unnamed)
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# commit 2f479e01f62ed96a9466d19d9df1aabeda77b335
2-
# Merge: b0f9293d b693389e
1+
# commit 38ee6ce2a0400573c0c7c5da782bc32ff578fcc4
2+
# Merge: c7086f7f 91b6db04
33
# Author: Callum Fare <[email protected]>
4-
# Date: Fri Nov 22 15:27:05 2024 +0000
5-
# Merge pull request #2370 from againull/multi_device_sanitizer
6-
# [L0] Check that program is in exe state in urProgramGetGlobalVariablePointer
4+
# Date: Mon Nov 25 11:04:37 2024 +0000
5+
# Merge pull request #2303 from nrspruit/zeInitDrivers
6+
# [L0] Implement Support for zeInitDrivers
77
set(UNIFIED_RUNTIME_TAG 7222f79b160681434250bac74f3aae0e4abc46f0)
8-

0 commit comments

Comments
 (0)