aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2010-08-23 23:21:23 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2010-08-23 23:21:23 +0000
commitd9a7316f9a72d8ea98313257ad8752c1dec36b89 (patch)
tree441b9e877c0380880798ef1c6ea7d1919bc340cc /test
parent49d96380753c8cb93181a5662ed60dbf6034ee67 (diff)
downloadexternal_llvm-d9a7316f9a72d8ea98313257ad8752c1dec36b89.zip
external_llvm-d9a7316f9a72d8ea98313257ad8752c1dec36b89.tar.gz
external_llvm-d9a7316f9a72d8ea98313257ad8752c1dec36b89.tar.bz2
llvmc: Make syntax more consistent.
CompilationGraph and LanguageMap definitions do not use special syntax anymore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111862 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/LLVMC/Alias.td2
-rw-r--r--test/LLVMC/AppendCmdHook.td2
-rw-r--r--test/LLVMC/EnvParentheses.td2
-rw-r--r--test/LLVMC/ForwardAs.td2
-rw-r--r--test/LLVMC/ForwardTransformedValue.td2
-rw-r--r--test/LLVMC/ForwardValue.td2
-rw-r--r--test/LLVMC/HookWithArguments.td2
-rw-r--r--test/LLVMC/HookWithInFile.td2
-rw-r--r--test/LLVMC/Init.td2
-rw-r--r--test/LLVMC/LanguageMap.td29
-rw-r--r--test/LLVMC/MultiValuedOption.td2
-rw-r--r--test/LLVMC/NoActions.td2
-rw-r--r--test/LLVMC/OneOrMore.td2
-rw-r--r--test/LLVMC/OptionPreprocessor.td2
-rw-r--r--test/LLVMC/OutputSuffixHook.td2
15 files changed, 43 insertions, 14 deletions
diff --git a/test/LLVMC/Alias.td b/test/LLVMC/Alias.td
index 45f7296..88e142d 100644
--- a/test/LLVMC/Alias.td
+++ b/test/LLVMC/Alias.td
@@ -21,4 +21,4 @@ def dummy_tool : Tool<[
(switch_on "dummy1"), (forward "dummy1")))
]>;
-def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;
+def DummyGraph : CompilationGraph<[(edge "root", "dummy_tool")]>;
diff --git a/test/LLVMC/AppendCmdHook.td b/test/LLVMC/AppendCmdHook.td
index b7e73fc..690ece7 100644
--- a/test/LLVMC/AppendCmdHook.td
+++ b/test/LLVMC/AppendCmdHook.td
@@ -26,4 +26,4 @@ def dummy_tool : Tool<[
(switch_on "dummy2"), (append_cmd "-arg3 $CALL(MyHook)")))
]>;
-def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;
+def DummyGraph : CompilationGraph<[(edge "root", "dummy_tool")]>;
diff --git a/test/LLVMC/EnvParentheses.td b/test/LLVMC/EnvParentheses.td
index dbbb171..403beb9 100644
--- a/test/LLVMC/EnvParentheses.td
+++ b/test/LLVMC/EnvParentheses.td
@@ -13,6 +13,6 @@ def dummy_tool : Tool<[
(out_language "dummy")
]>;
-def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;
+def DummyGraph : CompilationGraph<[(edge "root", "dummy_tool")]>;
def Graph : CompilationGraph<[]>;
diff --git a/test/LLVMC/ForwardAs.td b/test/LLVMC/ForwardAs.td
index 521f3c2..326e94b 100644
--- a/test/LLVMC/ForwardAs.td
+++ b/test/LLVMC/ForwardAs.td
@@ -18,4 +18,4 @@ def dummy_tool : Tool<[
(not_empty "dummy"), (forward_as "dummy", "unique_name")))
]>;
-def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;
+def DummyGraph : CompilationGraph<[(edge "root", "dummy_tool")]>;
diff --git a/test/LLVMC/ForwardTransformedValue.td b/test/LLVMC/ForwardTransformedValue.td
index a390d03..10038f6 100644
--- a/test/LLVMC/ForwardTransformedValue.td
+++ b/test/LLVMC/ForwardTransformedValue.td
@@ -24,4 +24,4 @@ def dummy_tool : Tool<[
(not_empty "b"), (forward_transformed_value "b", "HookB")))
]>;
-def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;
+def DummyGraph : CompilationGraph<[(edge "root", "dummy_tool")]>;
diff --git a/test/LLVMC/ForwardValue.td b/test/LLVMC/ForwardValue.td
index 93368f4..402fa50 100644
--- a/test/LLVMC/ForwardValue.td
+++ b/test/LLVMC/ForwardValue.td
@@ -21,4 +21,4 @@ def dummy_tool : Tool<[
(not_empty "b"), (forward_value "b")))
]>;
-def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;
+def DummyGraph : CompilationGraph<[(edge "root", "dummy_tool")]>;
diff --git a/test/LLVMC/HookWithArguments.td b/test/LLVMC/HookWithArguments.td
index ba5f820..b3260a9 100644
--- a/test/LLVMC/HookWithArguments.td
+++ b/test/LLVMC/HookWithArguments.td
@@ -17,4 +17,4 @@ def dummy_tool : Tool<[
(out_language "dummy")
]>;
-def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;
+def DummyGraph : CompilationGraph<[(edge "root", "dummy_tool")]>;
diff --git a/test/LLVMC/HookWithInFile.td b/test/LLVMC/HookWithInFile.td
index b8ae7e2..cc5da43 100644
--- a/test/LLVMC/HookWithInFile.td
+++ b/test/LLVMC/HookWithInFile.td
@@ -13,4 +13,4 @@ def dummy_tool : Tool<[
(out_language "dummy")
]>;
-def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;
+def DummyGraph : CompilationGraph<[(edge "root", "dummy_tool")]>;
diff --git a/test/LLVMC/Init.td b/test/LLVMC/Init.td
index 59459d9..8ab07d8 100644
--- a/test/LLVMC/Init.td
+++ b/test/LLVMC/Init.td
@@ -22,4 +22,4 @@ def dummy_tool : Tool<[
(not_empty "dummy2"), (forward "dummy2")))
]>;
-def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;
+def DummyGraph : CompilationGraph<[(edge "root", "dummy_tool")]>;
diff --git a/test/LLVMC/LanguageMap.td b/test/LLVMC/LanguageMap.td
new file mode 100644
index 0000000..aa1149c
--- /dev/null
+++ b/test/LLVMC/LanguageMap.td
@@ -0,0 +1,29 @@
+// Check that LanguageMap is processed properly.
+// 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"))
+]>;
+
+def dummy_tool : Tool<[
+(command "dummy_cmd"),
+(in_language "dummy_lang"),
+(out_language "dummy_lang"),
+(actions (case
+ (switch_on "dummy1"), (forward "dummy1")))
+]>;
+
+def lang_map : LanguageMap<[
+ // CHECK: langMap["dummy"] = "dummy_lang"
+ // CHECK: langMap["DUM"] = "dummy_lang"
+ (lang_to_suffixes "dummy_lang", ["dummy", "DUM"]),
+ // CHECK: langMap["DUM2"] = "dummy_lang_2"
+ (lang_to_suffixes "dummy_lang_2", "DUM2")
+]>;
+
+def DummyGraph : CompilationGraph<[(edge "root", "dummy_tool")]>;
diff --git a/test/LLVMC/MultiValuedOption.td b/test/LLVMC/MultiValuedOption.td
index 50c1f3d..b6da6ce 100644
--- a/test/LLVMC/MultiValuedOption.td
+++ b/test/LLVMC/MultiValuedOption.td
@@ -21,4 +21,4 @@ def dummy_tool : Tool<[
(not_empty "baz"), (forward "baz")))
]>;
-def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;
+def DummyGraph : CompilationGraph<[(edge "root", "dummy_tool")]>;
diff --git a/test/LLVMC/NoActions.td b/test/LLVMC/NoActions.td
index 1bc1c02..2573fbe 100644
--- a/test/LLVMC/NoActions.td
+++ b/test/LLVMC/NoActions.td
@@ -13,4 +13,4 @@ def dummy_tool : Tool<[
(out_language "dummy")
]>;
-def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;
+def DummyGraph : CompilationGraph<[(edge "root", "dummy_tool")]>;
diff --git a/test/LLVMC/OneOrMore.td b/test/LLVMC/OneOrMore.td
index fac22e6..bb0ad8b 100644
--- a/test/LLVMC/OneOrMore.td
+++ b/test/LLVMC/OneOrMore.td
@@ -22,4 +22,4 @@ def dummy_tool : Tool<[
(not_empty "baz"), (forward "baz")))
]>;
-def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;
+def DummyGraph : CompilationGraph<[(edge "root", "dummy_tool")]>;
diff --git a/test/LLVMC/OptionPreprocessor.td b/test/LLVMC/OptionPreprocessor.td
index e1e8eff..556530b 100644
--- a/test/LLVMC/OptionPreprocessor.td
+++ b/test/LLVMC/OptionPreprocessor.td
@@ -63,5 +63,5 @@ def dummy : Tool<
(not_empty "foo_l"), (error)))
]>;
-def Graph : CompilationGraph<[Edge<"root", "dummy">]>;
+def Graph : CompilationGraph<[(edge "root", "dummy")]>;
diff --git a/test/LLVMC/OutputSuffixHook.td b/test/LLVMC/OutputSuffixHook.td
index f217dc7..6bb2866 100644
--- a/test/LLVMC/OutputSuffixHook.td
+++ b/test/LLVMC/OutputSuffixHook.td
@@ -21,4 +21,4 @@ def dummy_tool : Tool<[
(switch_on "dummy1"), (output_suffix "$CALL(MyHook)")))
]>;
-def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;
+def DummyGraph : CompilationGraph<[(edge "root", "dummy_tool")]>;