Index: lib/Basic/Targets/AArch64.cpp =================================================================== --- lib/Basic/Targets/AArch64.cpp +++ lib/Basic/Targets/AArch64.cpp @@ -474,7 +474,6 @@ void MicrosoftARM64TargetInfo::getVisualStudioDefines( const LangOptions &Opts, MacroBuilder &Builder) const { WindowsTargetInfo::getVisualStudioDefines(Opts, Builder); - Builder.defineMacro("_WIN32", "1"); Builder.defineMacro("_WIN64", "1"); Builder.defineMacro("_M_ARM64", "1"); } @@ -494,10 +493,7 @@ void MinGWARM64TargetInfo::getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const { WindowsTargetInfo::getTargetDefines(Opts, Builder); - Builder.defineMacro("_WIN32", "1"); Builder.defineMacro("_WIN64", "1"); - Builder.defineMacro("WIN32", "1"); - Builder.defineMacro("WIN64", "1"); addMinGWDefines(Opts, Builder); } Index: test/Preprocessor/predefined-macros.c =================================================================== --- test/Preprocessor/predefined-macros.c +++ test/Preprocessor/predefined-macros.c @@ -204,8 +204,6 @@ // RUN: | FileCheck -match-full-lines %s --check-prefix=CHECK-ARM64-MINGW // CHECK-ARM64-MINGW-NOT: #define _M_ARM64 1 -// CHECK-ARM64-MINGW: #define WIN32 1 -// CHECK-ARM64-MINGW: #define WIN64 1 // CHECK-ARM64-MINGW: #define _WIN32 1 // CHECK-ARM64-MINGW: #define _WIN64 1 // CHECK-ARM64-MINGW: #define __aarch64__ 1