]> granicus.if.org Git - clang/commitdiff
clang-cl: Ignore /Zc:inline and /Zc:rvalueCast
authorReid Kleckner <reid@kleckner.net>
Tue, 1 Jul 2014 18:27:02 +0000 (18:27 +0000)
committerReid Kleckner <reid@kleckner.net>
Tue, 1 Jul 2014 18:27:02 +0000 (18:27 +0000)
These flags enable behavior in MSVC that Clang has by default.

/Zc:inline essentially marks all COMDATs as discardable.  In LLVM
parlance, this means using linkonce_odr linkage, which is what we
already do.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212117 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/CLCompatOptions.td
test/Driver/cl-options.c

index 66d424209d051d77ae7fa468b97eac65535c552f..0edf8ebdde1d38ed2a4f457395d48a430d9d22af 100644 (file)
@@ -198,6 +198,8 @@ def _SLASH_sdl : CLIgnoredFlag<"sdl">;
 def _SLASH_sdl_ : CLIgnoredFlag<"sdl-">;
 def _SLASH_w : CLIgnoredJoined<"w">;
 def _SLASH_Zc_forScope : CLIgnoredFlag<"Zc:forScope">;
+def _SLASH_Zc_inline : CLIgnoredFlag<"Zc:inline">;
+def _SLASH_Zc_rvalueCast : CLIgnoredFlag<"Zc:rvalueCast">;
 def _SLASH_Zc_wchar_t : CLIgnoredFlag<"Zc:wchar_t">;
 def _SLASH_Zm : CLIgnoredJoined<"Zm">;
 
index 38cbb347c6be0938a394075d565656e57f84ad4e..cd98ec3b72f4f7dd439fd3ed4c1e3935da965a3d 100644 (file)
 // RUN:    /wd1234 \
 // RUN:    /Zc:forScope \
 // RUN:    /Zc:wchar_t \
+// RUN:    /Zc:inline \
+// RUN:    /Zc:rvalueCast \
 // RUN:    -### -- %s 2>&1 | FileCheck -check-prefix=IGNORED %s
 // IGNORED-NOT: argument unused during compilation