blob: 4ecad2360ba062baf9e5e6cc95c056e997c1c3f3 [file] [log] [blame]
Mikhail Glushenkov545f9682009-12-15 07:20:50 +00001// Check that hooks can be invoked from 'output_suffix'.
2// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
Mikhail Glushenkovf8bc1e42009-12-15 07:21:14 +00003// RUN: FileCheck -input-file %t %s
Duncan Sandsbc15f242010-01-27 10:08:08 +00004// RUN: %compile_cxx -fexceptions -x c++ %t
Mikhail Glushenkov545f9682009-12-15 07:20:50 +00005// XFAIL: *
6
7include "llvm/CompilerDriver/Common.td"
8
9// CHECK: std::string MyHook()
10
11def OptList : OptionList<[
12(switch_option "dummy1", (help "none"))
13]>;
14
15def dummy_tool : Tool<[
16(cmd_line "dummy_cmd $INFILE"),
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]>;
23
24def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;