Skip to content

Commit fed9d2b

Browse files
authored
[SYCLomatic] Fix the hardcoded size of value type used in HeaderInsertedBitMap (#2824)
Signed-off-by: Jiang, Zhiwei <zhiwei.jiang@intel.com>
1 parent ced568a commit fed9d2b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

clang/lib/DPCT/AnalysisInfo.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2544,7 +2544,8 @@ std::vector<std::pair<std::string, std::vector<std::string>>>
25442544
std::unordered_set<std::string> DpctGlobalInfo::NeedParenAPISet = {};
25452545
std::unordered_set<std::string>
25462546
DpctGlobalInfo::CustomHelperFunctionAddtionalIncludes = {};
2547-
std::unordered_map<clang::tooling::UnifiedPath, std::bitset<32>>
2547+
std::unordered_map<clang::tooling::UnifiedPath,
2548+
std::bitset<HeaderType::NUM_HEADERS>>
25482549
DpctGlobalInfo::HeaderInsertedBitMap = {};
25492550
///// class DpctNameGenerator /////
25502551
void DpctNameGenerator::printName(const FunctionDecl *FD,

clang/lib/DPCT/AnalysisInfo.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,7 +1393,8 @@ class DpctGlobalInfo {
13931393
getCustomHelperFunctionAddtionalIncludes() {
13941394
return CustomHelperFunctionAddtionalIncludes;
13951395
}
1396-
static std::unordered_map<clang::tooling::UnifiedPath, std::bitset<32>> &
1396+
static std::unordered_map<clang::tooling::UnifiedPath,
1397+
std::bitset<HeaderType::NUM_HEADERS>> &
13971398
getHeaderInsertedBitMap() {
13981399
return HeaderInsertedBitMap;
13991400
}
@@ -1722,7 +1723,8 @@ class DpctGlobalInfo {
17221723
CodePinDumpFuncDepsVec;
17231724
static std::unordered_set<std::string> NeedParenAPISet;
17241725
static std::unordered_set<std::string> CustomHelperFunctionAddtionalIncludes;
1725-
static std::unordered_map<clang::tooling::UnifiedPath, std::bitset<32>>
1726+
static std::unordered_map<clang::tooling::UnifiedPath,
1727+
std::bitset<HeaderType::NUM_HEADERS>>
17261728
HeaderInsertedBitMap;
17271729
};
17281730

0 commit comments

Comments
 (0)