summaryrefslogtreecommitdiffstats
path: root/test/LLVMC/HookWithInFile.td
blob: f58e3f4288fbd768ed1521cd8407f8be4e2db7bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Check that a hook can be given $INFILE as an argument.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
// RUN: %compile_cxx -fexceptions -x c++ %t

include "llvm/CompilerDriver/Common.td"

def dummy_tool : Tool<[
// CHECK: Hook(inFile.c_str())
(command "$CALL(Hook, '$INFILE')/path"),
(in_language "dummy"),
(out_language "dummy")
]>;

def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;
OpenPOWER on IntegriCloud