1 // Check that hooks with arguments work.
2 // RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
3 // RUN: FileCheck -input-file %t %s
4 // RUN: %compile_cxx -Qunused-arguments -fexceptions -x c++ %t
6 include "llvm/CompilerDriver/Common.td"
8 // CHECK: Hook(const char* Arg0, const char* Arg1, const char* Arg2);
9 // CHECK: std::getenv("VARIABLE")
13 def dummy_tool : Tool<[
14 (cmd_line "$CALL(Hook, 'Arg1', 'Arg2', 'Arg3 Arg3Cont')/path arg1 $ENV(VARIABLE)/2path arg2 $INFILE"),
15 (in_language "dummy"),
16 (out_language "dummy")
19 def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;