summaryrefslogtreecommitdiffstats
path: root/llvm/test/LLVMC
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2009-12-15 03:04:02 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2009-12-15 03:04:02 +0000
commit2cb65bd5abf72a0675d9e5302ff7d14593b875d6 (patch)
tree238453123bbf43e0d0219274f0321425d111ce59 /llvm/test/LLVMC
parent53ec77972e5d1ffb66765b5376318f8847e00229 (diff)
downloadbcm5719-llvm-2cb65bd5abf72a0675d9e5302ff7d14593b875d6.tar.gz
bcm5719-llvm-2cb65bd5abf72a0675d9e5302ff7d14593b875d6.zip
Allow $CALL(Hook, '$INFILE') for non-join tools.
llvm-svn: 91402
Diffstat (limited to 'llvm/test/LLVMC')
-rw-r--r--llvm/test/LLVMC/HookWithInFile.td13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/LLVMC/HookWithInFile.td b/llvm/test/LLVMC/HookWithInFile.td
new file mode 100644
index 00000000000..a2cc4d81549
--- /dev/null
+++ b/llvm/test/LLVMC/HookWithInFile.td
@@ -0,0 +1,13 @@
+// Check that a hook can be given $INFILE as an argument.
+// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
+// RUN: grep Hook\\(inFile.c_str\\(\\)\\) %t | count 1
+
+include "llvm/CompilerDriver/Common.td"
+
+def dummy_tool : Tool<[
+(cmd_line "$CALL(Hook, '$INFILE')/path $INFILE"),
+(in_language "dummy"),
+(out_language "dummy")
+]>;
+
+def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;
OpenPOWER on IntegriCloud