diff --git a/clang/include/clang/Driver/CLCompatOptions.td b/clang/include/clang/Driver/CLCompatOptions.td index edc932ca0c40..f5cd2bf1ffa3 100644 --- a/clang/include/clang/Driver/CLCompatOptions.td +++ b/clang/include/clang/Driver/CLCompatOptions.td @@ -62,6 +62,10 @@ def _SLASH_GR : CLFlag<"GR">, HelpText<"Enable RTTI">, Alias; def _SLASH_GR_ : CLFlag<"GR-">, HelpText<"Disable RTTI">, Alias; def _SLASH_GF_ : CLFlag<"GF-">, HelpText<"Disable string pooling">, Alias; +def _SLASH_Gy : CLFlag<"Gy">, HelpText<"Put each function in it's own section">, + Alias; +def _SLASH_Gy_ : CLFlag<"Gy-">, HelpText<"Don't put each function in it's own section">, + Alias; def _SLASH_help : CLFlag<"help">, Alias, HelpText<"Display available options">; def _SLASH_HELP : CLFlag<"HELP">, Alias; @@ -225,8 +229,6 @@ def _SLASH_GS : CLFlag<"GS">; def _SLASH_Gs : CLJoined<"Gs">; def _SLASH_GT : CLFlag<"GT">; def _SLASH_GX : CLFlag<"GX">; -def _SLASH_Gy : CLFlag<"Gy">; -def _SLASH_Gy_ : CLFlag<"Gy-">; def _SLASH_Gz : CLFlag<"Gz">; def _SLASH_GZ : CLFlag<"GZ">; def _SLASH_H : CLFlag<"H">; diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c index dee71fff4f3e..b3623b75e01e 100644 --- a/clang/test/Driver/cl-options.c +++ b/clang/test/Driver/cl-options.c @@ -24,6 +24,12 @@ // RUN: %clang_cl /GR- -### -- %s 2>&1 | FileCheck -check-prefix=GR_ %s // GR_: -fno-rtti +// RUN: %clang_cl /Gy -### -- %s 2>&1 | FileCheck -check-prefix=Gy %s +// Gy: -ffunction-sections + +// RUN: %clang_cl /Gy /Gy- -### -- %s 2>&1 | FileCheck -check-prefix=Gy_ %s +// Gy_-NOT: -ffunction-sections + // RUN: %clang_cl /Imyincludedir -### -- %s 2>&1 | FileCheck -check-prefix=SLASH_I %s // RUN: %clang_cl /I myincludedir -### -- %s 2>&1 | FileCheck -check-prefix=SLASH_I %s // SLASH_I: "-I" "myincludedir" @@ -198,8 +204,6 @@ // RUN: /Gs1000 \ // RUN: /GT \ // RUN: /GX \ -// RUN: /Gy \ -// RUN: /Gy- \ // RUN: /Gz \ // RUN: /GZ \ // RUN: /H \