r224202 - clang-cl: Fix handling of the /volatile flag (PR21893)

Hans Wennborg hans at hanshq.net
Sat Dec 13 14:44:47 PST 2014


Author: hans
Date: Sat Dec 13 16:44:46 2014
New Revision: 224202

URL: http://llvm.org/viewvc/llvm-project?rev=224202&view=rev
Log:
clang-cl: Fix handling of the /volatile flag (PR21893)

The /volatile:iso flag is our default behaviour, so it can be ignored.

Parse /volatile:ms as unsupported.

Modified:
    cfe/trunk/include/clang/Driver/CLCompatOptions.td
    cfe/trunk/test/Driver/cl-options.c

Modified: cfe/trunk/include/clang/Driver/CLCompatOptions.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CLCompatOptions.td?rev=224202&r1=224201&r2=224202&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CLCompatOptions.td (original)
+++ cfe/trunk/include/clang/Driver/CLCompatOptions.td Sat Dec 13 16:44:46 2014
@@ -211,6 +211,7 @@ def _SLASH_Ob2 : CLIgnoredFlag<"Ob2">;
 def _SLASH_RTC : CLIgnoredJoined<"RTC">;
 def _SLASH_sdl : CLIgnoredFlag<"sdl">;
 def _SLASH_sdl_ : CLIgnoredFlag<"sdl-">;
+def _SLASH_volatile_iso : CLIgnoredFlag<"volatile:iso">;
 def _SLASH_w : CLIgnoredJoined<"w">;
 def _SLASH_Zc_forScope : CLIgnoredFlag<"Zc:forScope">;
 def _SLASH_Zc_inline : CLIgnoredFlag<"Zc:inline">;
@@ -271,7 +272,7 @@ def _SLASH_Qpar : CLFlag<"Qpar">;
 def _SLASH_Qvec_report : CLJoined<"Qvec-report">;
 def _SLASH_u : CLFlag<"u">;
 def _SLASH_V : CLFlag<"V">;
-def _SLASH_volatile : CLFlag<"volatile">;
+def _SLASH_volatile_ms : CLFlag<"volatile:ms">;
 def _SLASH_WL : CLFlag<"WL">;
 def _SLASH_Wp64 : CLFlag<"Wp64">;
 def _SLASH_X : CLFlag<"X">;

Modified: cfe/trunk/test/Driver/cl-options.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-options.c?rev=224202&r1=224201&r2=224202&view=diff
==============================================================================
--- cfe/trunk/test/Driver/cl-options.c (original)
+++ cfe/trunk/test/Driver/cl-options.c Sat Dec 13 16:44:46 2014
@@ -188,6 +188,7 @@
 // RUN:    /sdl \
 // RUN:    /sdl- \
 // RUN:    /vmg \
+// RUN:    /volatile:iso \
 // RUN:    /w12345 \
 // RUN:    /wd1234 \
 // RUN:    /Zc:forScope \
@@ -270,7 +271,7 @@
 // RUN:     /Qvec-report:2 \
 // RUN:     /u \
 // RUN:     /V \
-// RUN:     /volatile \
+// RUN:     /volatile:ms \
 // RUN:     /wfoo \
 // RUN:     /WL \
 // RUN:     /Wp64 \





More information about the cfe-commits mailing list