Index: clang/lib/Frontend/CompilerInvocation.cpp =================================================================== --- clang/lib/Frontend/CompilerInvocation.cpp +++ clang/lib/Frontend/CompilerInvocation.cpp @@ -2928,10 +2928,11 @@ Opts.FPMath = Args.getLastArgValue(OPT_mfpmath); Opts.FeaturesAsWritten = Args.getAllArgValues(OPT_target_feature); Opts.LinkerVersion = Args.getLastArgValue(OPT_target_linker_version); - Opts.Triple = llvm::Triple::normalize(Args.getLastArgValue(OPT_triple)); + Opts.Triple = Args.getLastArgValue(OPT_triple); // Use the default target triple if unspecified. if (Opts.Triple.empty()) Opts.Triple = llvm::sys::getDefaultTargetTriple(); + Opts.Triple = llvm::Triple::normalize(Opts.Triple); Opts.OpenCLExtensionsAsWritten = Args.getAllArgValues(OPT_cl_ext_EQ); Opts.ForceEnableInt128 = Args.hasArg(OPT_fforce_enable_int128); Opts.NVPTXUseShortPointers = Args.hasFlag( Index: clang/test/CodeGen/2007-06-18-SextAttrAggregate.c =================================================================== --- clang/test/CodeGen/2007-06-18-SextAttrAggregate.c +++ clang/test/CodeGen/2007-06-18-SextAttrAggregate.c @@ -1,5 +1,5 @@ // RUN: %clang_cc1 %s -o - -emit-llvm | FileCheck %s -// XFAIL: aarch64, arm64, x86_64-pc-win32, x86_64-w64-mingw32 +// XFAIL: aarch64, arm64, x86_64-pc-windows-msvc, x86_64-w64-windows-gnu // PR1513 Index: clang/test/CodeGenCXX/vtable-debug-info.cpp =================================================================== --- clang/test/CodeGenCXX/vtable-debug-info.cpp +++ clang/test/CodeGenCXX/vtable-debug-info.cpp @@ -1,6 +1,6 @@ // RUN: %clang -emit-llvm -S -g %s -o /dev/null // Radar 8730409 -// XFAIL: win32 +// XFAIL: windows-msvc // FIXME: This test crashes on *-pc-win32 // for lack of debugging support on -integrated-as (MCCOFF). Index: clang/test/Driver/coverage_no_integrated_as.c =================================================================== --- clang/test/Driver/coverage_no_integrated_as.c +++ clang/test/Driver/coverage_no_integrated_as.c @@ -1,5 +1,5 @@ // REQUIRES: clang-driver -// XFAIL: win32,win64 +// XFAIL: windows-msvc // RUN: %clang -### -S -fprofile-arcs %s 2>&1 | FileCheck -check-prefix=CHECK-GCNO-DEFAULT-LOCATION %s // RUN: %clang -### -S -fprofile-arcs -no-integrated-as %s 2>&1 | FileCheck -check-prefix=CHECK-GCNO-DEFAULT-LOCATION %s Index: clang/test/Driver/inhibit-downstream-commands.c =================================================================== --- clang/test/Driver/inhibit-downstream-commands.c +++ clang/test/Driver/inhibit-downstream-commands.c @@ -2,5 +2,5 @@ // CHECK: error: unknown type name 'invalid' // CHECK-NOT: clang: error: assembler command failed // CHECK-NOT: clang: error: linker command failed -// XFAIL: win32 +// XFAIL: windows-msvc invalid C code! Index: clang/test/Driver/linker-opts.c =================================================================== --- clang/test/Driver/linker-opts.c +++ clang/test/Driver/linker-opts.c @@ -5,7 +5,7 @@ // CHECK: "-L{{.*}}/test1" // GCC driver is used as linker on cygming. It should be aware of LIBRARY_PATH. -// XFAIL: win32 +// XFAIL: windows-msvc // REQUIRES: clang-driver // REQUIRES: native Index: clang/test/Driver/no-integrated-as.s =================================================================== --- clang/test/Driver/no-integrated-as.s +++ clang/test/Driver/no-integrated-as.s @@ -1,6 +1,6 @@ ; RUN: %clang -### -no-integrated-as -c %s 2>&1 | FileCheck %s -check-prefix IAS ; Windows doesn't support no-integrated-as -; XFAIL: win32,win64 +; XFAIL: windows-msvc ; ; Make sure the current file's filename appears in the output. ; We can't generically match on the assembler name, so we just make sure Index: clang/test/Lexer/cross-windows-on-linux.cpp =================================================================== --- clang/test/Lexer/cross-windows-on-linux.cpp +++ clang/test/Lexer/cross-windows-on-linux.cpp @@ -8,7 +8,7 @@ // expected to fail on windows as the inclusion would succeed and the // compilation will fail due to the '#error success'. -// XFAIL: win32 +// XFAIL: windows-msvc // This test may or may not fail since 'Inputs\success.h' is passed // to Win32 APIs on Windows. Index: clang/test/lit.cfg.py =================================================================== --- clang/test/lit.cfg.py +++ clang/test/lit.cfg.py @@ -133,7 +133,7 @@ config.available_features.add('dev-fd-fs') # Not set on native MS environment. -if not re.match(r'.*-win32$', config.target_triple): +if not re.match(r'.*-(win32|windows-msvc)$', config.target_triple): config.available_features.add('non-ms-sdk') # Not set on native PS4 environment. @@ -141,7 +141,7 @@ config.available_features.add('non-ps4-sdk') # [PR8833] LLP64-incompatible tests -if not re.match(r'^x86_64.*-(win32|mingw32|windows-gnu)$', config.target_triple): +if not re.match(r'^x86_64.*-(win32|mingw32|windows-msvc|windows-gnu)$', config.target_triple): config.available_features.add('LP64') # [PR12920] "clang-driver" -- set if gcc driver is not used. Index: compiler-rt/test/asan/TestCases/Posix/strndup_oob_test.cc =================================================================== --- compiler-rt/test/asan/TestCases/Posix/strndup_oob_test.cc +++ compiler-rt/test/asan/TestCases/Posix/strndup_oob_test.cc @@ -7,7 +7,7 @@ // RUN: %clangxx_asan -O3 -xc %s -o %t && not %run %t 2>&1 | FileCheck %s // Unwind problem on arm: "main" is missing from the allocation stack trace. -// UNSUPPORTED: win32,s390,armv7l-unknown-linux-gnueabihf +// UNSUPPORTED: windows-msvc,s390,armv7l-unknown-linux-gnueabihf #include Index: compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cc =================================================================== --- compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cc +++ compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cc @@ -7,7 +7,7 @@ // RUN: %clang_asan -O3 -xc %s -o %t && not %run %t 2>&1 | FileCheck %s // Unwind problem on arm: "main" is missing from the allocation stack trace. -// UNSUPPORTED: win32,s390,armv7l-unknown-linux-gnueabihf +// UNSUPPORTED: windows-msvc,s390,armv7l-unknown-linux-gnueabihf #include @@ -19,4 +19,4 @@ // CHECK: AddressSanitizer: global-buffer-overflow // CHECK: {{.*}}main {{.*}}.cc:[[@LINE-2]] return *copy; -} \ No newline at end of file +} Index: compiler-rt/test/asan/TestCases/allocator_returns_null.cc =================================================================== --- compiler-rt/test/asan/TestCases/allocator_returns_null.cc +++ compiler-rt/test/asan/TestCases/allocator_returns_null.cc @@ -36,7 +36,7 @@ // RUN: %env_asan_opts=allocator_may_return_null=1 %run %t new-nothrow 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-nnNULL -// UNSUPPORTED: win32 +// UNSUPPORTED: windows-msvc #include #include Index: compiler-rt/test/asan/TestCases/asan_and_llvm_coverage_test.cc =================================================================== --- compiler-rt/test/asan/TestCases/asan_and_llvm_coverage_test.cc +++ compiler-rt/test/asan/TestCases/asan_and_llvm_coverage_test.cc @@ -2,7 +2,7 @@ // RUN: %env_asan_opts=check_initialization_order=1 %run %t 2>&1 | FileCheck %s // We don't really support running tests using profile runtime on Windows. -// UNSUPPORTED: win32 +// UNSUPPORTED: windows-msvc #include int foo() { return 1; } int XXX = foo(); Index: compiler-rt/test/asan/TestCases/atoll_strict.c =================================================================== --- compiler-rt/test/asan/TestCases/atoll_strict.c +++ compiler-rt/test/asan/TestCases/atoll_strict.c @@ -11,7 +11,7 @@ // RUN: %env_asan_opts=strict_string_checks=true not %run %t test3 2>&1 | FileCheck %s --check-prefix=CHECK3 // FIXME: Needs Windows interceptor. -// XFAIL: win32 +// XFAIL: windows-msvc #include #include Index: compiler-rt/test/asan/TestCases/initialization-bug.cc =================================================================== --- compiler-rt/test/asan/TestCases/initialization-bug.cc +++ compiler-rt/test/asan/TestCases/initialization-bug.cc @@ -6,7 +6,7 @@ // Do not test with optimization -- the error may be optimized away. // FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=186 -// XFAIL: win32 +// XFAIL: windows-msvc // The test is expected to fail on OS X Yosemite and older // UNSUPPORTED: osx-no-ld64-live_support Index: compiler-rt/test/asan/TestCases/intra-object-overflow.cc =================================================================== --- compiler-rt/test/asan/TestCases/intra-object-overflow.cc +++ compiler-rt/test/asan/TestCases/intra-object-overflow.cc @@ -5,7 +5,7 @@ // FIXME: fix 32-bits. // REQUIRES: asan-64-bits, shadow-scale-3 // FIXME: Implement ASan intra-object padding in Clang's MS record layout -// UNSUPPORTED: win32 +// UNSUPPORTED: windows-msvc #include #include class Foo { Index: compiler-rt/test/asan/TestCases/log-path_test.cc =================================================================== --- compiler-rt/test/asan/TestCases/log-path_test.cc +++ compiler-rt/test/asan/TestCases/log-path_test.cc @@ -31,7 +31,7 @@ // RUN: not cat %t.log.* // FIXME: log_path is not supported on Windows yet. -// XFAIL: win32 +// XFAIL: windows-msvc #include #include Index: compiler-rt/test/asan/TestCases/pass-object-byval.cc =================================================================== --- compiler-rt/test/asan/TestCases/pass-object-byval.cc +++ compiler-rt/test/asan/TestCases/pass-object-byval.cc @@ -5,7 +5,7 @@ // RUN: Assertion{{.*}}failed // ASan instrumentation can't insert red-zones around inalloca parameters. -// XFAIL: win32 && asan-32-bits +// XFAIL: windows-msvc && asan-32-bits #include Index: compiler-rt/test/asan/TestCases/printf-2.c =================================================================== --- compiler-rt/test/asan/TestCases/printf-2.c +++ compiler-rt/test/asan/TestCases/printf-2.c @@ -6,7 +6,7 @@ // RUN: %env_asan_opts=replace_str=0:intercept_strlen=0:replace_intrin=0 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s // FIXME: printf is not intercepted on Windows yet. -// XFAIL: win32 +// XFAIL: windows-msvc #include #include Index: compiler-rt/test/asan/TestCases/printf-3.c =================================================================== --- compiler-rt/test/asan/TestCases/printf-3.c +++ compiler-rt/test/asan/TestCases/printf-3.c @@ -4,7 +4,7 @@ // RUN: not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s // FIXME: printf is not intercepted on Windows yet. -// XFAIL: win32 +// XFAIL: windows-msvc #include int main() { Index: compiler-rt/test/asan/TestCases/printf-4.c =================================================================== --- compiler-rt/test/asan/TestCases/printf-4.c +++ compiler-rt/test/asan/TestCases/printf-4.c @@ -4,7 +4,7 @@ // FIXME: sprintf is not intercepted on Windows yet. But this test can // pass if sprintf calls memmove, which is intercepted, so we can't XFAIL it. -// UNSUPPORTED: win32 +// UNSUPPORTED: windows-msvc #include int main() { Index: compiler-rt/test/asan/TestCases/printf-5.c =================================================================== --- compiler-rt/test/asan/TestCases/printf-5.c +++ compiler-rt/test/asan/TestCases/printf-5.c @@ -5,7 +5,7 @@ // RUN: %env_asan_opts=replace_intrin=0 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s // FIXME: printf is not intercepted on Windows yet. -// XFAIL: win32 +// XFAIL: windows-msvc #include #include Index: compiler-rt/test/asan/TestCases/printf-m.c =================================================================== --- compiler-rt/test/asan/TestCases/printf-m.c +++ compiler-rt/test/asan/TestCases/printf-m.c @@ -1,7 +1,7 @@ // RUN: %clang_asan -O2 %s -o %t && %run %t // FIXME: printf is not intercepted on Windows yet. -// UNSUPPORTED: win32 +// UNSUPPORTED: windows-msvc #include Index: compiler-rt/test/asan/TestCases/set_shadow_test.c =================================================================== --- compiler-rt/test/asan/TestCases/set_shadow_test.c +++ compiler-rt/test/asan/TestCases/set_shadow_test.c @@ -6,7 +6,7 @@ // RUN: not %run %t 0xf5 2>&1 | FileCheck %s -check-prefix=XF5 // RUN: not %run %t 0xf8 2>&1 | FileCheck %s -check-prefix=XF8 -// XFAIL: win32 +// XFAIL: windows-msvc #include #include Index: compiler-rt/test/asan/TestCases/strcasestr-1.c =================================================================== --- compiler-rt/test/asan/TestCases/strcasestr-1.c +++ compiler-rt/test/asan/TestCases/strcasestr-1.c @@ -6,7 +6,7 @@ // RUN: %env_asan_opts=intercept_strstr=false:replace_str=false %run %t 2>&1 // There's no interceptor for strcasestr on Windows -// XFAIL: win32 +// XFAIL: windows-msvc #define _GNU_SOURCE #include Index: compiler-rt/test/asan/TestCases/strcasestr-2.c =================================================================== --- compiler-rt/test/asan/TestCases/strcasestr-2.c +++ compiler-rt/test/asan/TestCases/strcasestr-2.c @@ -6,7 +6,7 @@ // RUN: %env_asan_opts=intercept_strstr=false:replace_str=false:intercept_strlen=false %run %t 2>&1 // There's no interceptor for strcasestr on Windows -// XFAIL: win32 +// XFAIL: windows-msvc #define _GNU_SOURCE #include Index: compiler-rt/test/asan/TestCases/strcasestr_strict.c =================================================================== --- compiler-rt/test/asan/TestCases/strcasestr_strict.c +++ compiler-rt/test/asan/TestCases/strcasestr_strict.c @@ -4,7 +4,7 @@ // RUN: %env_asan_opts=strict_string_checks=true not %run %t 2>&1 | FileCheck %s // There's no interceptor for strcasestr on Windows -// XFAIL: win32 +// XFAIL: windows-msvc #define _GNU_SOURCE #include Index: compiler-rt/test/asan/TestCases/strcat-overlap.cc =================================================================== --- compiler-rt/test/asan/TestCases/strcat-overlap.cc +++ compiler-rt/test/asan/TestCases/strcat-overlap.cc @@ -31,7 +31,7 @@ // depending on how strcat() is implemented. For now only run // on platforms where we know the test passes. // REQUIRES: x86_64h-darwin || x86_64-darwin || i386-darwin || x86_64-linux || i386-linux -// UNSUPPORTED: win32 +// UNSUPPORTED: windows-msvc // UNSUPPORTED: android #include Index: compiler-rt/test/asan/TestCases/strncasecmp_strict.c =================================================================== --- compiler-rt/test/asan/TestCases/strncasecmp_strict.c +++ compiler-rt/test/asan/TestCases/strncasecmp_strict.c @@ -14,7 +14,7 @@ // RUN: %env_asan_opts=strict_string_checks=false %run %t i 2>&1 // RUN: %env_asan_opts=strict_string_checks=true not %run %t i 2>&1 | FileCheck %s -// XFAIL: win32 +// XFAIL: windows-msvc #include #include Index: compiler-rt/test/asan/TestCases/strtoll_strict.c =================================================================== --- compiler-rt/test/asan/TestCases/strtoll_strict.c +++ compiler-rt/test/asan/TestCases/strtoll_strict.c @@ -24,7 +24,7 @@ // FIXME: Enable strtoll interceptor. // REQUIRES: shadow-scale-3 -// XFAIL: win32 +// XFAIL: windows-msvc #include #include Index: compiler-rt/test/asan/TestCases/suppressions-exec-relative-location.cc =================================================================== --- compiler-rt/test/asan/TestCases/suppressions-exec-relative-location.cc +++ compiler-rt/test/asan/TestCases/suppressions-exec-relative-location.cc @@ -24,7 +24,7 @@ // RUN: FileCheck --check-prefix=CHECK-WRONG-FILE-NAME %s // XFAIL: android -// XFAIL: win32 +// XFAIL: windows-msvc // UNSUPPORTED: ios #include Index: compiler-rt/test/asan/TestCases/time_interceptor.cc =================================================================== --- compiler-rt/test/asan/TestCases/time_interceptor.cc +++ compiler-rt/test/asan/TestCases/time_interceptor.cc @@ -3,7 +3,7 @@ // Test the time() interceptor. // There's no interceptor for time() on Windows yet. -// XFAIL: win32 +// XFAIL: windows-msvc #include #include Index: compiler-rt/test/asan/TestCases/verbose-log-path_test.cc =================================================================== --- compiler-rt/test/asan/TestCases/verbose-log-path_test.cc +++ compiler-rt/test/asan/TestCases/verbose-log-path_test.cc @@ -9,7 +9,7 @@ // RUN: FileCheck %s --check-prefix=CHECK-ERROR < %T/asan.log.verbose-log-path_test-binary.* // FIXME: only FreeBSD, NetBSD and Linux have verbose log paths now. -// XFAIL: win32,android +// XFAIL: windows-msvc,android // UNSUPPORTED: ios #include Index: compiler-rt/test/cfi/bad-split.cpp =================================================================== --- compiler-rt/test/cfi/bad-split.cpp +++ compiler-rt/test/cfi/bad-split.cpp @@ -1,7 +1,7 @@ // GlobalSplit used to lose type metadata for classes with virtual bases but no virtual methods. // RUN: %clangxx_cfi -o %t1 %s && %run %t1 -// UNSUPPORTED: win32 +// UNSUPPORTED: windows-msvc struct Z { }; Index: compiler-rt/test/cfi/target_uninstrumented.cpp =================================================================== --- compiler-rt/test/cfi/target_uninstrumented.cpp +++ compiler-rt/test/cfi/target_uninstrumented.cpp @@ -3,7 +3,7 @@ // RUN: %run %t 2>&1 | FileCheck %s // REQUIRES: cxxabi -// UNSUPPORTED: win32 +// UNSUPPORTED: windows-msvc #include #include Index: compiler-rt/test/cfi/two-vcalls.cpp =================================================================== --- compiler-rt/test/cfi/two-vcalls.cpp +++ compiler-rt/test/cfi/two-vcalls.cpp @@ -4,7 +4,7 @@ // This test checks that we don't generate two type checks, // if two virtual calls are in the same function. -// UNSUPPORTED: win32 +// UNSUPPORTED: windows-msvc // REQUIRES: cxxabi // TODO(krasin): implement the optimization to not emit two type checks. Index: compiler-rt/test/msan/allocator_returns_null.cc =================================================================== --- compiler-rt/test/msan/allocator_returns_null.cc +++ compiler-rt/test/msan/allocator_returns_null.cc @@ -36,7 +36,7 @@ // RUN: MSAN_OPTIONS=allocator_may_return_null=1 %run %t new-nothrow 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-nnNULL -// UNSUPPORTED: win32 +// UNSUPPORTED: windows-msvc #include #include Index: compiler-rt/test/msan/pvalloc.cc =================================================================== --- compiler-rt/test/msan/pvalloc.cc +++ compiler-rt/test/msan/pvalloc.cc @@ -5,7 +5,7 @@ // RUN: MSAN_OPTIONS=allocator_may_return_null=1 %run %t psm1 2>&1 // pvalloc is Linux only -// UNSUPPORTED: win32, freebsd, netbsd +// UNSUPPORTED: windows-msvc, freebsd, netbsd // Checks that pvalloc overflows are caught. If the allocator is allowed to // return null, the errno should be set to ENOMEM. Index: compiler-rt/test/msan/strndup.cc =================================================================== --- compiler-rt/test/msan/strndup.cc +++ compiler-rt/test/msan/strndup.cc @@ -4,7 +4,7 @@ // When built as C on Linux, strndup is transformed to __strndup. // RUN: %clangxx_msan -O3 -xc %s -o %t && not %run %t 2>&1 | FileCheck --check-prefix=ON %s -// UNSUPPORTED: win32 +// UNSUPPORTED: windows-msvc #include #include Index: compiler-rt/test/sanitizer_common/TestCases/malloc_hook.cc =================================================================== --- compiler-rt/test/sanitizer_common/TestCases/malloc_hook.cc +++ compiler-rt/test/sanitizer_common/TestCases/malloc_hook.cc @@ -1,7 +1,7 @@ // RUN: %clangxx -O2 %s -o %t && %run %t 2>&1 | FileCheck %s // Malloc/free hooks are not supported on Windows. -// XFAIL: win32 +// XFAIL: windows-msvc // XFAIL: ubsan #include Index: compiler-rt/test/sanitizer_common/TestCases/strcasestr.c =================================================================== --- compiler-rt/test/sanitizer_common/TestCases/strcasestr.c +++ compiler-rt/test/sanitizer_common/TestCases/strcasestr.c @@ -1,7 +1,7 @@ // RUN: %clang %s -o %t && %run %t 2>&1 // There's no interceptor for strcasestr on Windows -// XFAIL: win32 +// XFAIL: windows-msvc #define _GNU_SOURCE #include Index: compiler-rt/test/ubsan/TestCases/Misc/enum.cpp =================================================================== --- compiler-rt/test/ubsan/TestCases/Misc/enum.cpp +++ compiler-rt/test/ubsan/TestCases/Misc/enum.cpp @@ -4,7 +4,7 @@ // FIXME: UBSan fails to add the correct instrumentation code for some reason on // Windows. -// XFAIL: win32 +// XFAIL: windows-msvc enum E { a = 1 } e; #undef E Index: compiler-rt/test/ubsan/TestCases/Misc/log-path_test.cc =================================================================== --- compiler-rt/test/ubsan/TestCases/Misc/log-path_test.cc +++ compiler-rt/test/ubsan/TestCases/Misc/log-path_test.cc @@ -21,7 +21,7 @@ // RUN: not cat %t.log.* // FIXME: log_path is not supported on Windows yet. -// XFAIL: win32 +// XFAIL: windows-msvc #include #include Index: compiler-rt/test/ubsan/TestCases/TypeCheck/Function/function.cpp =================================================================== --- compiler-rt/test/ubsan/TestCases/TypeCheck/Function/function.cpp +++ compiler-rt/test/ubsan/TestCases/TypeCheck/Function/function.cpp @@ -2,7 +2,7 @@ // RUN: %run %t 2>&1 | FileCheck %s // Verify that we can disable symbolization if needed: // RUN: %env_ubsan_opts=symbolize=0 %run %t 2>&1 | FileCheck %s --check-prefix=NOSYM -// XFAIL: win32,win64 +// XFAIL: windows-msvc #include Index: compiler-rt/test/ubsan/TestCases/TypeCheck/PR33221.cpp =================================================================== --- compiler-rt/test/ubsan/TestCases/TypeCheck/PR33221.cpp +++ compiler-rt/test/ubsan/TestCases/TypeCheck/PR33221.cpp @@ -2,7 +2,7 @@ // RUN: %run %t 2>&1 | FileCheck %s // REQUIRES: cxxabi -// UNSUPPORTED: win32 +// UNSUPPORTED: windows-msvc #include Index: compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-corrupted-vtable-itanium.cpp =================================================================== --- compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-corrupted-vtable-itanium.cpp +++ compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-corrupted-vtable-itanium.cpp @@ -1,7 +1,7 @@ // RUN: %clangxx -frtti -fsanitize=vptr -fno-sanitize-recover=vptr,null -g %s -O3 -o %t // RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-CORRUPTED-VTABLE --strict-whitespace -// UNSUPPORTED: win32 +// UNSUPPORTED: windows-msvc // REQUIRES: stable-runtime, cxxabi #include Index: compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp =================================================================== --- compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp +++ compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp @@ -3,7 +3,7 @@ // RUN: %run %t // // REQUIRES: cxxabi -// UNSUPPORTED: win32 +// UNSUPPORTED: windows-msvc struct X { virtual ~X() {} Index: compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base-construction.cpp =================================================================== --- compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base-construction.cpp +++ compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base-construction.cpp @@ -2,7 +2,7 @@ // RUN: %run %t // REQUIRES: cxxabi -// UNSUPPORTED: win32 +// UNSUPPORTED: windows-msvc int volatile n; Index: compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp =================================================================== --- compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp +++ compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp @@ -2,7 +2,7 @@ // RUN: not %run %t 2>&1 | FileCheck %s // REQUIRES: cxxabi -// UNSUPPORTED: win32 +// UNSUPPORTED: windows-msvc struct S { virtual int f() { return 0; } }; struct T : virtual S {}; Index: compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp =================================================================== --- compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp +++ compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp @@ -37,7 +37,7 @@ // RUN: %env_ubsan_opts=halt_on_error=1:suppressions='"%t.loc-supp"' not %run %t x- 2>&1 | FileCheck %s --check-prefix=CHECK-LOC-SUPPRESS // REQUIRES: stable-runtime, cxxabi -// UNSUPPORTED: win32 +// UNSUPPORTED: windows-msvc // Suppressions file not pushed to the device. // UNSUPPORTED: android #include Index: llvm/cmake/modules/GetHostTriple.cmake =================================================================== --- llvm/cmake/modules/GetHostTriple.cmake +++ llvm/cmake/modules/GetHostTriple.cmake @@ -4,15 +4,15 @@ function( get_host_triple var ) if( MSVC ) if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) - set( value "x86_64-pc-win32" ) + set( value "x86_64-pc-windows-msvc" ) else() - set( value "i686-pc-win32" ) + set( value "i686-pc-windows-msvc" ) endif() elseif( MINGW AND NOT MSYS ) if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) - set( value "x86_64-w64-mingw32" ) + set( value "x86_64-w64-windows-gnu" ) else() - set( value "i686-pc-mingw32" ) + set( value "i686-pc-windows-gnu" ) endif() else( MSVC ) set(config_guess ${LLVM_MAIN_SRC_DIR}/cmake/config.guess) Index: llvm/lib/Support/Unix/Host.inc =================================================================== --- llvm/lib/Support/Unix/Host.inc +++ llvm/lib/Support/Unix/Host.inc @@ -64,5 +64,5 @@ TargetTripleString = EnvTriple; #endif - return Triple::normalize(TargetTripleString); + return TargetTripleString; } Index: llvm/lib/Support/Windows/Host.inc =================================================================== --- llvm/lib/Support/Windows/Host.inc +++ llvm/lib/Support/Windows/Host.inc @@ -30,5 +30,5 @@ Triple = EnvTriple; #endif - return Triple::normalize(Triple); + return Triple; } Index: llvm/test/lit.cfg.py =================================================================== --- llvm/test/lit.cfg.py +++ llvm/test/lit.cfg.py @@ -104,9 +104,9 @@ llc_args = [] # Similarly, have a macro to use llc with DWARF even when the host is win32. -if re.search(r'win32', config.target_triple): +if re.search(r'windows-msvc', config.target_triple): llc_args = [' -mtriple=' + - config.target_triple.replace('-win32', '-mingw32')] + config.target_triple.replace('-msvc', '-gnu')] # Provide the path to asan runtime lib if available. On darwin, this lib needs # to be loaded via DYLD_INSERT_LIBRARIES before libLTO.dylib in case the files Index: llvm/utils/lit/lit/llvm/config.py =================================================================== --- llvm/utils/lit/lit/llvm/config.py +++ llvm/utils/lit/lit/llvm/config.py @@ -88,7 +88,7 @@ 'ASAN_OPTIONS', 'detect_leaks=1', append_path=True) if re.match(r'^x86_64.*-linux', target_triple): features.add('x86_64-linux') - if re.match(r'.*-win32$', target_triple): + if re.match(r'.*-windows-msvc$', target_triple): features.add('target-windows') use_gmalloc = lit_config.params.get('use_gmalloc', None) @@ -236,10 +236,10 @@ if not m: self.lit_config.fatal( "Could not turn '%s' into Itanium ABI triple" % triple) - if m.group(3).lower() != 'win32': - # All non-win32 triples use the Itanium ABI. + if m.group(3).lower() != 'windows': + # All non-windows triples use the Itanium ABI. return triple - return m.group(1) + '-' + m.group(2) + '-mingw32' + return m.group(1) + '-' + m.group(2) + '-' + m.group(3) + '-gnu' def make_msabi_triple(self, triple): m = re.match(r'(\w+)-(\w+)-(\w+)', triple) @@ -249,14 +249,14 @@ isa = m.group(1).lower() vendor = m.group(2).lower() os = m.group(3).lower() - if os == 'win32': - # If the OS is win32, we're done. + if os == 'windows' and re.match(r'.*-msvc$', triple): + # If the OS is windows and environment is msvc, we're done. return triple if isa.startswith('x86') or isa == 'amd64' or re.match(r'i\d86', isa): # For x86 ISAs, adjust the OS. - return isa + '-' + vendor + '-win32' - # -win32 is not supported for non-x86 targets; use a default. - return 'i686-pc-win32' + return isa + '-' + vendor + '-windows-msvc' + # -msvc is not supported for non-x86 targets; use a default. + return 'i686-pc-windows-msvc' def add_tool_substitutions(self, tools, search_dirs=None): if not search_dirs: