diff options
author | Mikhail Glushenkov <foldr@codedgers.com> | 2009-01-21 13:04:00 +0000 |
---|---|---|
committer | Mikhail Glushenkov <foldr@codedgers.com> | 2009-01-21 13:04:00 +0000 |
commit | a298bb752572f03f3b65260a73cb39df02770075 (patch) | |
tree | 56cdc9db6881f9d41a239ad6d7d79b79d42f6f4d /test/LLVMC | |
parent | 8f7c2e67693faa76065749652ed027b32e8212b2 (diff) | |
download | external_llvm-a298bb752572f03f3b65260a73cb39df02770075.zip external_llvm-a298bb752572f03f3b65260a73cb39df02770075.tar.gz external_llvm-a298bb752572f03f3b65260a73cb39df02770075.tar.bz2 |
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')
-rw-r--r-- | test/LLVMC/HookWithArguments.td | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/LLVMC/HookWithArguments.td b/test/LLVMC/HookWithArguments.td new file mode 100644 index 0000000..0f7c379 --- /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">]>; |