summaryrefslogtreecommitdiff
path: root/test/LLVMC
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2010-08-20 18:16:26 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2010-08-20 18:16:26 +0000
commit297514d1556188a81040e31ab2ad62943d98c4b6 (patch)
treeebb8db0e06ba1842713846b3faf9897584002411 /test/LLVMC
parent8d18006cf2e607fea265fa35c73ec2f8690f4b78 (diff)
downloadllvm-297514d1556188a81040e31ab2ad62943d98c4b6.tar.gz
llvm-297514d1556188a81040e31ab2ad62943d98c4b6.tar.bz2
llvm-297514d1556188a81040e31ab2ad62943d98c4b6.tar.xz
llvmc: Fix alias generation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111662 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/LLVMC')
-rw-r--r--test/LLVMC/Alias.td24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/LLVMC/Alias.td b/test/LLVMC/Alias.td
new file mode 100644
index 0000000000..45f7296b72
--- /dev/null
+++ b/test/LLVMC/Alias.td
@@ -0,0 +1,24 @@
+// Test alias generation.
+// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
+// RUN: FileCheck -input-file %t %s
+// RUN: %compile_cxx -x c++ %t
+// XFAIL: vg_leak
+
+include "llvm/CompilerDriver/Common.td"
+
+def OptList : OptionList<[
+
+(switch_option "dummy1", (help "none")),
+// CHECK: cl::alias Alias_dummy2
+(alias_option "dummy2", "dummy1")
+]>;
+
+def dummy_tool : Tool<[
+(command "dummy_cmd"),
+(in_language "dummy_lang"),
+(out_language "dummy_lang"),
+(actions (case
+ (switch_on "dummy1"), (forward "dummy1")))
+]>;
+
+def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;