Skip to content

Commit

Permalink
[SYCLomatic] Ignore VS version error of query-api-mapping on windows. (
Browse files Browse the repository at this point in the history
…#2388)



Signed-off-by: Tang, Jiajun jiajun.tang@intel.com
  • Loading branch information
tangjj11 authored Oct 10, 2024
1 parent c657bfd commit 172ab44
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions clang/lib/DPCT/DPCT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -937,12 +937,6 @@ int runDPCT(int argc, const char **argv) {
}

Tool.appendArgumentsAdjuster(getInsertArgumentAdjuster("-w"));
#ifdef _WIN32 // Avoid some error on windows platform.
if (DpctGlobalInfo::getSDKVersion() <= CudaVersion::CUDA_100) {
Tool.appendArgumentsAdjuster(
getInsertArgumentAdjuster("-D_MSC_VER=1900"));
}
#endif
NoIncrementalMigration.setValue(true);
StopOnParseErr.setValue(true);
Tool.setPrintErrorMessage(false);
Expand Down Expand Up @@ -1238,6 +1232,12 @@ int runDPCT(int argc, const char **argv) {
if (DpctGlobalInfo::isQueryAPIMapping()) {
std::string Err = getDpctTermStr();
StringRef ErrStr = Err;
// Avoid the "Visual Studio version" error on windows platform.
if (ErrStr.find_first_of("error") == ErrStr.find_last_of("error") &&
ErrStr.contains(
"error -- unsupported Microsoft Visual Studio version")) {
continue;
}
if (ErrStr.contains("use of undeclared identifier")) {
ShowStatus(MigrationErrorAPIMappingWrongCUDAHeader,
QueryAPIMapping);
Expand Down

0 comments on commit 172ab44

Please sign in to comment.