[PATCH] MS ABI: Implement /volatile:ms

Hans Wennborg hans at chromium.org
Thu Feb 12 15:07:20 PST 2015


I just looked at the flag stuff since others seem to have looked at the rest.


================
Comment at: include/clang/Driver/CLCompatOptions.td:206
@@ +205,3 @@
+def _SLASH_volatile_iso : Option<["/", "-"], "volatile:iso", KIND_FLAG>, Group<_SLASH_volatile_Group>,
+  Flags<[CLOption, DriverOption]>, HelpText<"Volatile loads and stores have standard C++ semantics">;
+def _SLASH_volatile_ms  : Option<["/", "-"], "volatile:ms", KIND_FLAG>, Group<_SLASH_volatile_Group>,
----------------
nit: I'd skip "C++": just "standard semantics" is shorter (and more accurate in the C case I guess)

================
Comment at: include/clang/Driver/CLCompatOptions.td:208
@@ -205,1 +207,3 @@
+def _SLASH_volatile_ms  : Option<["/", "-"], "volatile:ms", KIND_FLAG>, Group<_SLASH_volatile_Group>,
+  Flags<[CLOption, DriverOption]>, HelpText<"Volatile loads and stores will have acquire and release semantics">;
 
----------------
nit: there's no "will" in the :iso flag description. I'd leave it out here too. Would it be less accurate to just say that loads and stores are atomic?

================
Comment at: test/Driver/cl-options.c:126
@@ -125,1 +125,3 @@
 
+// RUN: %clang_cl /volatile:iso -### -- %s 2>&1 | FileCheck -check-prefix=VOLATILE-ISO %s
+// VOLATILE-ISO-NOT: "-fms-volatile"
----------------
maybe add a test without /volatile and check that -fms-volatile doesn't get passed by default?

http://reviews.llvm.org/D7580

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list