diff options
Diffstat (limited to 'tools/llvmc/plugins/Base/Base.td.in')
-rw-r--r-- | tools/llvmc/plugins/Base/Base.td.in | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/llvmc/plugins/Base/Base.td.in b/tools/llvmc/plugins/Base/Base.td.in index 8f928cc..c7ba3be 100644 --- a/tools/llvmc/plugins/Base/Base.td.in +++ b/tools/llvmc/plugins/Base/Base.td.in @@ -91,15 +91,16 @@ def OptList : OptionList<[ // Option preprocessor. def Preprocess : OptionPreprocessor< -(case (and (switch_on "O3"), (any_switch_on ["O0", "O1", "O2"])), +(case (not (any_switch_on ["O0", "O1", "O2", "O3"])), + (set_option "O2"), + (and (switch_on "O3"), (any_switch_on ["O0", "O1", "O2"])), (unset_option ["O0", "O1", "O2"]), (and (switch_on "O2"), (any_switch_on ["O0", "O1"])), (unset_option ["O0", "O1"]), - (and (switch_on "O1"), (switch_on "O0")), + (switch_on ["O1", "O0"]), (unset_option "O0")) >; - // Tools class llvm_gcc_based <string cmd_prefix, string in_lang, string E_ext> : Tool< @@ -123,9 +124,9 @@ class llvm_gcc_based <string cmd_prefix, string in_lang, string E_ext> : Tool< (and (multiple_input_files), (or (switch_on "S"), (switch_on "c"))), (error "cannot specify -o with -c or -S with multiple files"), (switch_on "E"), [(stop_compilation), (output_suffix E_ext)], - (and (switch_on "emit-llvm"), (switch_on "S")), + (switch_on ["emit-llvm", "S"]), [(output_suffix "ll"), (stop_compilation)], - (and (switch_on "emit-llvm"), (switch_on "c")), (stop_compilation), + (switch_on ["emit-llvm", "c"]), (stop_compilation), (switch_on "fsyntax-only"), (stop_compilation), (not_empty "include"), (forward "include"), (not_empty "save-temps"), (append_cmd "-save-temps"), |