Skip to content

Commit 72a1024

Browse files
authored
[SYCL][clang-offload-wrapper] Use unsigned int in constexpr to avoid ambiguous call (#11776)
On windows ICX build , using int may cause build failures. clang-offload-wrapper/SymPropReader.cpp(168,34): error: call to member function 'getAggregateElement' is ambiguous
1 parent 15e81fa commit 72a1024

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

clang/tools/clang-offload-wrapper/SymPropReader.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ auto getInitializerNumElements(const Constant *Initializer) {
7373
// };
7474
//
7575

76-
constexpr int EntriesBeginIndexInTDI{10};
77-
constexpr int PropertySetBeginIndexInTDI{12};
76+
constexpr unsigned int EntriesBeginIndexInTDI{10};
77+
constexpr unsigned int PropertySetBeginIndexInTDI{12};
7878

7979
// struct __tgt_offload_entry {
8080
// void *addr;
@@ -92,8 +92,8 @@ constexpr int nameIndexInTOE{1};
9292
// _pi_device_binary_property_struct* PropertiesEnd;
9393
// };
9494

95-
constexpr int NameIndexInPIDBPSS{0};
96-
constexpr int PropertiesBeginIndexInPIDBPSS{1};
95+
constexpr unsigned int NameIndexInPIDBPSS{0};
96+
constexpr unsigned int PropertiesBeginIndexInPIDBPSS{1};
9797

9898
// struct _pi_device_binary_property_struct {
9999
// char *Name;
@@ -102,10 +102,10 @@ constexpr int PropertiesBeginIndexInPIDBPSS{1};
102102
// uint64_t ValSize;
103103
// };
104104

105-
constexpr int NameIndexInPIDBPS{0};
106-
constexpr int ValAddrIndexInPIDBPS{1};
107-
constexpr int TypeIndexInPIDBPS{2};
108-
constexpr int ValSizeIndexInPIDBPS{3};
105+
constexpr unsigned int NameIndexInPIDBPS{0};
106+
constexpr unsigned int ValAddrIndexInPIDBPS{1};
107+
constexpr unsigned int TypeIndexInPIDBPS{2};
108+
constexpr unsigned int ValSizeIndexInPIDBPS{3};
109109

110110
} // namespace
111111

0 commit comments

Comments
 (0)