summaryrefslogtreecommitdiff
path: root/test/LLVMC/HookWithArguments.td
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2009-01-21 13:04:00 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2009-01-21 13:04:00 +0000
commita298bb752572f03f3b65260a73cb39df02770075 (patch)
tree56cdc9db6881f9d41a239ad6d7d79b79d42f6f4d /test/LLVMC/HookWithArguments.td
parent8f7c2e67693faa76065749652ed027b32e8212b2 (diff)
downloadllvm-a298bb752572f03f3b65260a73cb39df02770075.tar.gz
llvm-a298bb752572f03f3b65260a73cb39df02770075.tar.bz2
llvm-a298bb752572f03f3b65260a73cb39df02770075.tar.xz
Allow hooks with arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62685 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/LLVMC/HookWithArguments.td')
-rw-r--r--test/LLVMC/HookWithArguments.td16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/LLVMC/HookWithArguments.td b/test/LLVMC/HookWithArguments.td
new file mode 100644
index 0000000000..0f7c3797cb
--- /dev/null
+++ b/test/LLVMC/HookWithArguments.td
@@ -0,0 +1,16 @@
+// Check that hooks with arguments work.
+// RUN: tblgen -I $srcroot/include --gen-llvmc %s -o %t
+// RUN: grep {Hook(const char\\* Arg0, const char\\* Arg1, const char\\* Arg2);} %t | count 1
+// RUN: grep "/path" %t | count 1
+// RUN: grep "VARIABLE" %t | count 1
+// RUN: grep "/2path" %t | count 1
+
+include "llvm/CompilerDriver/Common.td"
+
+def dummy_tool : Tool<[
+(cmd_line "$CALL(Hook, 'Arg1', 'Arg2', 'Arg3 Arg3Cont')/path arg1 $ENV(VARIABLE)/2path arg2 $INFILE"),
+(in_language "dummy"),
+(out_language "dummy")
+]>;
+
+def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;