Switch .bc/.ll Makefile rules to use LLVM{CC,CXX} instead of LLVMG{CC,XX}
[oota-llvm.git] / test / LLVMC / AppendCmdHook.td
1 // Check that hooks can be invoked from 'append_cmd'.
2 // RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
3 // RUN: FileCheck -input-file %t %s
4 // RUN: %compile_cxx -fexceptions -x c++ %t
5
6 include "llvm/CompilerDriver/Common.td"
7
8 // CHECK: std::string MyHook()
9
10 def OptList : OptionList<[
11 (switch_option "dummy1", (help "none")),
12 (switch_option "dummy2", (help "none"))
13 ]>;
14
15 def dummy_tool : Tool<[
16 (command "dummy_cmd"),
17 (in_language "dummy_lang"),
18 (out_language "dummy_lang"),
19 (actions (case
20          // CHECK: , "-arg1"));
21          // CHECK: , "-arg2"));
22          (switch_on "dummy1"), (append_cmd "-arg1 -arg2"),
23          // CHECK: , "-arg3"));
24          // CHECK: hooks::MyHook()
25          (switch_on "dummy2"), (append_cmd "-arg3 $CALL(MyHook)")))
26 ]>;
27
28 def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;