Skip to content

Commit c063f34

Browse files
committed
fix failure in CI test
Signed-off-by: chenwei.sun <chenwei.sun@intel.com>
1 parent b70a52f commit c063f34

4 files changed

Lines changed: 1 addition & 10 deletions

File tree

clang/lib/DPCT/AnalysisInfo.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,11 +1493,6 @@ std::string DpctGlobalInfo::getStringForRegexReplacement(StringRef MatchedStr) {
14931493
const bool IsCppSource = (FileType & SPT_CppSource);
14941494
const auto Extention = Vec[Index + 1];
14951495

1496-
if (Extention == ".h") {
1497-
return (HasCUDASyntax && IsCppSource)
1498-
? "h" + DpctGlobalInfo::getSYCLSourceExtension()
1499-
: "h";
1500-
}
15011496
if (Extention == ".cc") {
15021497
return (HasCUDASyntax && IsCppSource)
15031498
? "cc" + DpctGlobalInfo::getSYCLSourceExtension()

clang/lib/DPCT/FileGenerator/GenFiles.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ void rewriteFileName(std::string &FileName, const std::string &FullPathName) {
204204
SmallString<512> CanonicalPathStr(FullPathName);
205205
const auto Extension = path::extension(CanonicalPathStr);
206206
SourceProcessType FileType = GetSourceFileType(FullPathName);
207-
208207
// If user does not specify which extension need be changed, we change all the
209208
// SPT_CudaSource, SPT_CppSource and SPT_CudaHeader files.
210209
if (DpctGlobalInfo::getChangeExtensions().empty() ||

clang/lib/DPCT/RulesInclude/InclusionHeaders.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ void IncludesCallbacks::InclusionDirective(
175175
const auto Extension = path::extension(FileName);
176176
SmallString<512> NewFileName(FileName.str());
177177

178-
if (Extension == ".c" || Extension == ".h" || Extension == ".cc") {
178+
if (Extension == ".c" || Extension == ".cc") {
179179
auto &Vec = DpctGlobalInfo::getInstance().getCSourceFileList();
180180
path::replace_extension(
181181
NewFileName, "{{NEEDREPLACEE" + std::to_string(Vec.size()) + "}}");

clang/test/dpct/include/main.cu

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@
5353
// case 4: cuh file not in database.
5454
// CHECK: #include "test4.dp.hpp"
5555
#include "test4.cuh"
56-
// case 5: header file has CUDA syntax, in database.
57-
// CHECK: #include "test5.h.dp.cpp"
58-
#include "test5.h"
5956
// case 6: header file has CUDA syntax, not in database.
6057
// CHECK: #include "test6.h"
6158
#include "test6.h"

0 commit comments

Comments
 (0)