r288997 - Add more tests for MSVC version handling.

David L. Jones via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 7 15:39:45 PST 2016


Author: dlj
Date: Wed Dec  7 17:39:44 2016
New Revision: 288997

URL: http://llvm.org/viewvc/llvm-project?rev=288997&view=rev
Log:
Add more tests for MSVC version handling.

Summary:
This change adds more test cases for the default MSVC compatibility version:
 1. When -fms-extensions is supplied, but -fmsc-version and
    -fms-compatibility-version are not.
 2. With the target triple specifies an MSVC environment, but no other
    -fms* flags.

Reviewers: rnk, llvm-commits

Subscribers: hans, compnerd, amccarth

Differential Revision: https://reviews.llvm.org/D27498

Modified:
    cfe/trunk/test/Driver/msc-version.c
    cfe/trunk/test/Driver/msvc-triple.c

Modified: cfe/trunk/test/Driver/msc-version.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/msc-version.c?rev=288997&r1=288996&r2=288997&view=diff
==============================================================================
--- cfe/trunk/test/Driver/msc-version.c (original)
+++ cfe/trunk/test/Driver/msc-version.c Wed Dec  7 17:39:44 2016
@@ -55,3 +55,12 @@
 // CHECK-MSC-15-NOT: "-fmsc-version=150020706"
 // CHECK-MSC-15: "-fms-compatibility-version=15.0.20706"
 
+//
+// Verify default version with -fms-extensions
+//
+
+// RUN: %clang -target i686-windows -fms-extensions -dM -E - </dev/null -o - | FileCheck %s -check-prefix CHECK-MS-EXTENSIONS
+
+// CHECK-MS-EXTENSIONS: _MSC_BUILD 1
+// CHECK-MS-EXTENSIONS: _MSC_FULL_VER {{..}}000000
+// CHECK-MS-EXTENSIONS: _MSC_VER {{..}}00

Modified: cfe/trunk/test/Driver/msvc-triple.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/msvc-triple.c?rev=288997&r1=288996&r2=288997&view=diff
==============================================================================
--- cfe/trunk/test/Driver/msvc-triple.c (original)
+++ cfe/trunk/test/Driver/msvc-triple.c Wed Dec  7 17:39:44 2016
@@ -1,7 +1,9 @@
 // RUN: %clang -target i686-pc-windows-msvc19 -S -emit-llvm %s -o - | FileCheck %s --check-prefix=TARGET-19
 // RUN: %clang -target i686-pc-windows-msvc   -S -emit-llvm %s -o - -fms-compatibility-version=19 | FileCheck %s --check-prefix=OVERRIDE-19
 // RUN: %clang -target i686-pc-windows-msvc-elf -S -emit-llvm %s -o - | FileCheck %s --check-prefix=ELF-DEFAULT
+// RUN: %clang -target i686-pc-windows-msvc   -S -emit-llvm %s -o - | FileCheck %s --check-prefix=DEFAULT
 
 // TARGET-19:   target triple = "i686-pc-windows-msvc19.0.0"
 // OVERRIDE-19: target triple = "i686-pc-windows-msvc19.0.0"
 // ELF-DEFAULT: target triple = "i686-pc-windows-msvc{{.*}}-elf"
+// DEFAULT:     target triple = "i686-pc-windows-msvc{{[^-]+}}"




More information about the cfe-commits mailing list