File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1730,7 +1730,14 @@ class DpctGlobalInfo {
17301730 static std::unordered_set<std::string> CustomHelperFunctionAddtionalIncludes;
17311731 static std::unordered_map<clang::tooling::UnifiedPath, std::bitset<32 >>
17321732 HeaderInsertedBitMap;
1733+ // `IsAfterBitsStdcxx` is used as a flag. It is set to true when PP meet
1734+ // <bits/stdc++.h>. It is reset to false when starting to process a new
1735+ // translation unit.
17331736 static bool IsAfterBitsStdcxx;
1737+ // If `IsAfterBitsStdcxx` is true, it means <bits/stdc++.h> is already
1738+ // included, so the tool will record all files included since this time point.
1739+ // When inserting `sycl.hpp`, the tool can check if the insert location is in
1740+ // the map, if it is, the tool will also insert `sycl.hpp` at the main file.
17341741 static std::map<clang::tooling::UnifiedPath /* MainFile*/ ,
17351742 std::set<clang::tooling::UnifiedPath>>
17361743 AfterBitsStdcxxFiles;
You can’t perform that action at this time.
0 commit comments