From 59819d42357084dc2addccf624f3af34be510f0e Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Tue, 1 Jul 2014 18:27:02 +0000 Subject: [PATCH] clang-cl: Ignore /Zc:inline and /Zc:rvalueCast 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 | 2 ++ test/Driver/cl-options.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/clang/Driver/CLCompatOptions.td b/include/clang/Driver/CLCompatOptions.td index 66d424209d..0edf8ebdde 100644 --- a/include/clang/Driver/CLCompatOptions.td +++ b/include/clang/Driver/CLCompatOptions.td @@ -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">; diff --git a/test/Driver/cl-options.c b/test/Driver/cl-options.c index 38cbb347c6..cd98ec3b72 100644 --- a/test/Driver/cl-options.c +++ b/test/Driver/cl-options.c @@ -178,6 +178,8 @@ // 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 -- 2.40.0