Skip to content

Commit

Permalink
Make "-opt [-emit-llvm]" work for .ll files.
Browse files Browse the repository at this point in the history
Patch by Kaelyn Uhrain!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126000 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Mikhail Glushenkov committed Feb 19, 2011
1 parent dc8c3fd commit 75dab00
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/llvmc/src/Base.td.in
Original file line number Diff line number Diff line change
Expand Up @@ -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<
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 75dab00

Please sign in to comment.