mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-25 14:32:53 +00:00
22 lines
707 B
TableGen
22 lines
707 B
TableGen
|
// Check that forward_transformed_value works.
|
||
|
// The dummy tool and graph are required to silence warnings.
|
||
|
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
|
||
|
// RUN: grep HookA %t
|
||
|
// RUN: grep HookB %t
|
||
|
|
||
|
include "llvm/CompilerDriver/Common.td"
|
||
|
|
||
|
def OptList : OptionList<[(parameter_option "a", (extern)),
|
||
|
(prefix_list_option "b", (extern))]>;
|
||
|
|
||
|
def dummy_tool : Tool<[
|
||
|
(cmd_line "dummy_cmd $INFILE"),
|
||
|
(in_language "dummy"),
|
||
|
(out_language "dummy"),
|
||
|
(actions (case
|
||
|
(not_empty "a"), (forward_transformed_value "a", "HookA"),
|
||
|
(not_empty "b"), (forward_transformed_value "b", "HookB")))
|
||
|
]>;
|
||
|
|
||
|
def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;
|