From 9c1e9db22e8a753d8330008ad0e4ec20f90efea4 Mon Sep 17 00:00:00 2001 From: "Wang, Zhiming" Date: Mon, 25 Nov 2024 13:25:56 +0800 Subject: [PATCH] [SYCLomatic][NFC] Use _WIN32 (using of Windows API) instead of _WIN64. (#2509) --- clang/lib/DPCT/FileGenerator/GenFiles.cpp | 4 ++-- clang/lib/DPCT/Utility.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clang/lib/DPCT/FileGenerator/GenFiles.cpp b/clang/lib/DPCT/FileGenerator/GenFiles.cpp index a9e46f4d0564..b9f374c63d71 100644 --- a/clang/lib/DPCT/FileGenerator/GenFiles.cpp +++ b/clang/lib/DPCT/FileGenerator/GenFiles.cpp @@ -146,7 +146,7 @@ std::map IncludeFileMap; bool rewriteDir(std::string &FilePath, const clang::tooling::UnifiedPath &InRoot, const clang::tooling::UnifiedPath &OutRoot) { -#if defined(_WIN64) +#if defined(_WIN32) std::string Filename = sys::path::filename(FilePath).str(); #endif @@ -163,7 +163,7 @@ bool rewriteDir(std::string &FilePath, path::begin(InRoot.getCanonicalPath())); SmallString<512> NewFilePath = OutRoot.getCanonicalPath(); path::append(NewFilePath, PathDiff.first, path::end(FilePath)); -#if defined(_WIN64) +#if defined(_WIN32) sys::path::remove_filename(NewFilePath); sys::path::append(NewFilePath, Filename); #endif diff --git a/clang/lib/DPCT/Utility.cpp b/clang/lib/DPCT/Utility.cpp index 364efe4f6131..332b9e5779aa 100644 --- a/clang/lib/DPCT/Utility.cpp +++ b/clang/lib/DPCT/Utility.cpp @@ -78,7 +78,7 @@ const char *getNL(bool AddBackSlash) { return "\\\n"; } return "\n"; -#elif defined(_WIN64) +#elif defined(_WIN32) if (AddBackSlash) { return "\\\r\n"; }