Heuristic: If the number of operands in the alias are more than the number of
[llvm/stm8.git] / test / LLVMC / OutputSuffixHook.td
blob1f5ecd1237f3d45f605fc54910635cc516f11912
1 // Check that hooks can be invoked from 'output_suffix'.
2 // RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
3 // RUN: FileCheck -input-file %t %s
4 // RUN: %compile_cxx %t
5 // XFAIL: vg_leak
7 include "llvm/CompilerDriver/Common.td"
9 // CHECK: std::string MyHook()
11 def OptList : OptionList<[
12 (switch_option "dummy1", (help "none"))
13 ]>;
15 def dummy_tool : Tool<[
16 (command "dummy_cmd"),
17 (in_language "dummy_lang"),
18 (out_language "dummy_lang"),
19 (actions (case
20          // CHECK: hooks::MyHook()
21          (switch_on "dummy1"), (output_suffix "$CALL(MyHook)")))
22 ]>;
24 def DummyGraph : CompilationGraph<[(edge "root", "dummy_tool")]>;