From e41df91c1db91b1917344e8e7c82d179c1489d3e Mon Sep 17 00:00:00 2001 From: Mikhail Glushenkov Date: Sat, 19 Feb 2011 00:33:27 +0000 Subject: [PATCH] Make "-opt [-emit-llvm]" work for .ll files. Patch by Kaelyn Uhrain! llvm-svn: 126000 --- tools/llvmc/src/Base.td.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/llvmc/src/Base.td.in b/tools/llvmc/src/Base.td.in index 02310a944cb..50533f11fa4 100644 --- a/tools/llvmc/src/Base.td.in +++ b/tools/llvmc/src/Base.td.in @@ -274,7 +274,8 @@ def llvm_as : Tool< (out_language "llvm-bitcode"), (output_suffix "bc"), (command "llvm-as"), - (actions (case (switch_on "emit-llvm"), (stop_compilation))) + (actions (case (and (switch_on "emit-llvm"), (not (switch_on "opt"))), + (stop_compilation))) ]>; def llvm_gcc_assembler : Tool< @@ -424,7 +425,8 @@ def CompilationGraph : CompilationGraph<[ (edge "llvm_as", "llc"), (optional_edge "root", "llvm_as", - (case (switch_on "emit-llvm"), (inc_weight))), + (case (or (switch_on "emit-llvm"), + (switch_on "opt")), (inc_weight))), (optional_edge "llvm_gcc_c", "opt", (case (switch_on "opt"), (inc_weight))), (optional_edge "llvm_gcc_cpp", "opt",