clang-cl: Expose -fmerge-all-constants
authorHans Wennborg <hans@hanshq.net>
Mon, 30 Apr 2018 19:04:04 +0000 (19:04 +0000)
committerHans Wennborg <hans@hanshq.net>
Mon, 30 Apr 2018 19:04:04 +0000 (19:04 +0000)
Now that constant merging is off by default, we'd like a way to enable
it on Windows.

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

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

index 3a5d58a8ee7d7f9ff981056c98ed13c6565e4a5a..80facb79a48a663b4c1ea1213254470d3fd65c21 100644 (file)
@@ -1176,7 +1176,7 @@ def fthinlto_index_EQ : Joined<["-"], "fthinlto-index=">,
 def fmacro_backtrace_limit_EQ : Joined<["-"], "fmacro-backtrace-limit=">,
                                 Group<f_Group>, Flags<[DriverOption, CoreOption]>;
 def fmerge_all_constants : Flag<["-"], "fmerge-all-constants">, Group<f_Group>,
-  Flags<[CC1Option]>, HelpText<"Allow merging of constants">;
+  Flags<[CC1Option, CoreOption]>, HelpText<"Allow merging of constants">;
 def fmessage_length_EQ : Joined<["-"], "fmessage-length=">, Group<f_Group>;
 def fms_extensions : Flag<["-"], "fms-extensions">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
   HelpText<"Accept some non-standard constructs supported by the Microsoft compiler">;
index 4b4e2f0883cde179dfea35028c33feeb3112d2e3..37c2fa5b690b38ba2118c9a1cc33674a4d27240c 100644 (file)
 // RUN:     -fstandalone-debug \
 // RUN:     -flimit-debug-info \
 // RUN:     -flto \
+// RUN:     -fmerge-all-constants \
 // RUN:     --version \
 // RUN:     -Werror /Zs -- %s 2>&1