From abc482effcabd373f5c96fb8f9dd493968a112dd Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Fri, 13 Feb 2015 07:55:47 +0000 Subject: MS ABI: Implement /volatile:ms The /volatile:ms semantics turn volatile loads and stores into atomic acquire and release operations. This distinction is important because volatile memory operations do not form a happens-before relationship with non-atomic memory. This means that a volatile store is not sufficient for implementing a mutex unlock routine. Differential Revision: http://reviews.llvm.org/D7580 llvm-svn: 229082 --- clang/test/Driver/cl-options.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clang/test/Driver/cl-options.c') diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c index bfd7f10b94b..ba717f0ff4c 100644 --- a/clang/test/Driver/cl-options.c +++ b/clang/test/Driver/cl-options.c @@ -123,6 +123,12 @@ // RUN: %clang_cl /vmg /vmm /vms -### -- %s 2>&1 | FileCheck -check-prefix=VMX %s // VMX: '/vms' not allowed with '/vmm' +// RUN: %clang_cl /volatile:iso -### -- %s 2>&1 | FileCheck -check-prefix=VOLATILE-ISO %s +// VOLATILE-ISO-NOT: "-fms-volatile" + +// RUN: %clang_cl /volatile:ms -### -- %s 2>&1 | FileCheck -check-prefix=VOLATILE-MS %s +// VOLATILE-MS: "-fms-volatile" + // RUN: %clang_cl /W0 -### -- %s 2>&1 | FileCheck -check-prefix=W0 %s // W0: -w -- cgit v1.2.3