aboutsummaryrefslogtreecommitdiff
path: root/test/LLVMC
diff options
context:
space:
mode:
Diffstat (limited to 'test/LLVMC')
-rw-r--r--test/LLVMC/Alias.td24
-rw-r--r--test/LLVMC/AppendCmdHook.td4
-rw-r--r--test/LLVMC/EmptyCompilationGraph.td2
-rw-r--r--test/LLVMC/EnvParentheses.td4
-rw-r--r--test/LLVMC/ExternOptions.td26
-rw-r--r--test/LLVMC/ForwardAs.td6
-rw-r--r--test/LLVMC/ForwardTransformedValue.td12
-rw-r--r--test/LLVMC/ForwardValue.td12
-rw-r--r--test/LLVMC/HookWithArguments.td4
-rw-r--r--test/LLVMC/HookWithInFile.td4
-rw-r--r--test/LLVMC/Init.td4
-rw-r--r--test/LLVMC/LanguageMap.td29
-rw-r--r--test/LLVMC/MultiValuedOption.td6
-rw-r--r--test/LLVMC/MultipleCompilationGraphs.td2
-rw-r--r--test/LLVMC/MultiplePluginPriorities.td17
-rw-r--r--test/LLVMC/NoActions.td4
-rw-r--r--test/LLVMC/NoCompilationGraph.td2
-rw-r--r--test/LLVMC/OneOrMore.td4
-rw-r--r--test/LLVMC/OptionPreprocessor.td4
-rw-r--r--test/LLVMC/OutputSuffixHook.td8
-rw-r--r--test/LLVMC/TestWarnings.td2
21 files changed, 95 insertions, 85 deletions
diff --git a/test/LLVMC/Alias.td b/test/LLVMC/Alias.td
new file mode 100644
index 000000000000..5d37889304bd
--- /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 %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<[(edge "root", "dummy_tool")]>;
diff --git a/test/LLVMC/AppendCmdHook.td b/test/LLVMC/AppendCmdHook.td
index 254d5eaf37af..c85f002e6e8b 100644
--- a/test/LLVMC/AppendCmdHook.td
+++ b/test/LLVMC/AppendCmdHook.td
@@ -1,7 +1,7 @@
// Check that hooks can be invoked from 'append_cmd'.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -fexceptions -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.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/EmptyCompilationGraph.td b/test/LLVMC/EmptyCompilationGraph.td
index e5d5e9a64cdb..a52b8a8c1990 100644
--- a/test/LLVMC/EmptyCompilationGraph.td
+++ b/test/LLVMC/EmptyCompilationGraph.td
@@ -1,6 +1,6 @@
// Check that the compilation graph can be empty.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
-// RUN: %compile_cxx -fexceptions -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
diff --git a/test/LLVMC/EnvParentheses.td b/test/LLVMC/EnvParentheses.td
index 86091db9bdfb..ce0cb824604c 100644
--- a/test/LLVMC/EnvParentheses.td
+++ b/test/LLVMC/EnvParentheses.td
@@ -2,7 +2,7 @@
// http://llvm.org/bugs/show_bug.cgi?id=4157
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: not grep {FOO")));} %t
-// RUN: %compile_cxx -fexceptions -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.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/ExternOptions.td b/test/LLVMC/ExternOptions.td
deleted file mode 100644
index d84ea847bf12..000000000000
--- a/test/LLVMC/ExternOptions.td
+++ /dev/null
@@ -1,26 +0,0 @@
-// Check that extern options work.
-// The dummy tool and graph are required to silence warnings.
-// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
-// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -fexceptions -x c++ %t
-// XFAIL: vg_leak
-
-include "llvm/CompilerDriver/Common.td"
-
-// CHECK: extern cl::opt<bool> AutoGeneratedSwitch_Wall
-
-def OptList : OptionList<[(switch_option "Wall", (extern)),
- (parameter_option "std", (extern)),
- (prefix_list_option "L", (extern))]>;
-
-def dummy_tool : Tool<[
-(command "dummy_cmd"),
-(in_language "dummy"),
-(out_language "dummy"),
-(actions (case
- (switch_on "Wall"), (stop_compilation),
- (not_empty "std"), (stop_compilation),
- (not_empty "L"), (stop_compilation)))
-]>;
-
-def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;
diff --git a/test/LLVMC/ForwardAs.td b/test/LLVMC/ForwardAs.td
index 536b96a9758f..99b240e30fb3 100644
--- a/test/LLVMC/ForwardAs.td
+++ b/test/LLVMC/ForwardAs.td
@@ -2,12 +2,12 @@
// http://llvm.org/bugs/show_bug.cgi?id=4159
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -fexceptions -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
-def OptList : OptionList<[(parameter_option "dummy", (extern))]>;
+def OptList : OptionList<[(parameter_option "dummy", (help "dummmy"))]>;
def dummy_tool : Tool<[
(command "dummy_cmd"),
@@ -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 5e0bf290d1fd..9184ede36101 100644
--- a/test/LLVMC/ForwardTransformedValue.td
+++ b/test/LLVMC/ForwardTransformedValue.td
@@ -2,13 +2,13 @@
// The dummy tool and graph are required to silence warnings.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -fexceptions -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
-def OptList : OptionList<[(parameter_option "a", (extern)),
- (prefix_list_option "b", (extern))]>;
+def OptList : OptionList<[(parameter_option "a", (help "dummy")),
+ (prefix_list_option "b", (help "dummy"))]>;
// CHECK: std::string HookA
// CHECK: std::string HookB
@@ -18,10 +18,10 @@ def dummy_tool : Tool<[
(in_language "dummy"),
(out_language "dummy"),
(actions (case
- // CHECK: HookA(AutoGeneratedParameter_a
+ // CHECK: HookA(autogenerated::Parameter_a
(not_empty "a"), (forward_transformed_value "a", "HookA"),
- // CHECK: HookB(AutoGeneratedList_b
+ // CHECK: HookB(autogenerated::List_b
(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 4c7a0ee0ec5e..a42a3f06ec3d 100644
--- a/test/LLVMC/ForwardValue.td
+++ b/test/LLVMC/ForwardValue.td
@@ -2,23 +2,23 @@
// The dummy tool and graph are required to silence warnings.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -fexceptions -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
-def OptList : OptionList<[(parameter_option "a", (extern)),
- (prefix_list_option "b", (extern))]>;
+def OptList : OptionList<[(parameter_option "a", (help "dummy")),
+ (prefix_list_option "b", (help "dummy"))]>;
def dummy_tool : Tool<[
(command "dummy_cmd"),
(in_language "dummy"),
(out_language "dummy"),
(actions (case
- // CHECK: , AutoGeneratedParameter_a));
+ // CHECK: , autogenerated::Parameter_a));
(not_empty "a"), (forward_value "a"),
- // CHECK: B = AutoGeneratedList_b.begin()
+ // CHECK: B = autogenerated::List_b.begin()
(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 5ff96cd6a88d..bbba2e984599 100644
--- a/test/LLVMC/HookWithArguments.td
+++ b/test/LLVMC/HookWithArguments.td
@@ -1,7 +1,7 @@
// Check that hooks with arguments work.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -fexceptions -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.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 9855dbc5bd9a..ed08b5321ccf 100644
--- a/test/LLVMC/HookWithInFile.td
+++ b/test/LLVMC/HookWithInFile.td
@@ -1,7 +1,7 @@
// Check that a hook can be given $INFILE as an argument.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -fexceptions -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.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 05209bf61aca..c3846797026e 100644
--- a/test/LLVMC/Init.td
+++ b/test/LLVMC/Init.td
@@ -1,7 +1,7 @@
// Check that (init true/false) and (init "str") work.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -fexceptions -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.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 000000000000..a0502142e6d7
--- /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 %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 73ccb6311f3c..08c753380d47 100644
--- a/test/LLVMC/MultiValuedOption.td
+++ b/test/LLVMC/MultiValuedOption.td
@@ -2,7 +2,7 @@
// The dummy tool and graph are required to silence warnings.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -fexceptions -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
@@ -10,7 +10,7 @@ include "llvm/CompilerDriver/Common.td"
def OptList : OptionList<[
// CHECK: cl::multi_val(2)
(prefix_list_option "foo", (multi_val 2)),
- (parameter_list_option "baz", (multi_val 2), (extern))]>;
+ (parameter_list_option "baz", (multi_val 2))]>;
def dummy_tool : Tool<[
(command "dummy_cmd"),
@@ -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/MultipleCompilationGraphs.td b/test/LLVMC/MultipleCompilationGraphs.td
index 86cd6131243a..b3746c03b6cb 100644
--- a/test/LLVMC/MultipleCompilationGraphs.td
+++ b/test/LLVMC/MultipleCompilationGraphs.td
@@ -1,6 +1,6 @@
// Check that multiple compilation graphs are allowed.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
-// RUN: %compile_cxx -fexceptions -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
diff --git a/test/LLVMC/MultiplePluginPriorities.td b/test/LLVMC/MultiplePluginPriorities.td
deleted file mode 100644
index 2fe06450eecb..000000000000
--- a/test/LLVMC/MultiplePluginPriorities.td
+++ /dev/null
@@ -1,17 +0,0 @@
-// Check that multiple plugin priorities are not allowed.
-// RUN: ignore tblgen -I %p/../../include --gen-llvmc %s |& grep "More than one 'PluginPriority' instance found"
-
-// Disable for Darwin PPC: <rdar://problem/7598390>
-// XFAIL: powerpc-apple-darwin
-
-// Generally XFAIL'ed for now, this is (sometimes?) failing on x86_64-apple-darwin10.
-// RUN: false
-// XFAIL: *
-
-include "llvm/CompilerDriver/Common.td"
-
-def Graph : CompilationGraph<[]>;
-
-def Priority1 : PluginPriority<1>;
-
-def Priority2 : PluginPriority<2>;
diff --git a/test/LLVMC/NoActions.td b/test/LLVMC/NoActions.td
index a80bcfe6ce1c..34b444066350 100644
--- a/test/LLVMC/NoActions.td
+++ b/test/LLVMC/NoActions.td
@@ -1,7 +1,7 @@
// Check that tools without associated actions are accepted.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -fexceptions -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.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/NoCompilationGraph.td b/test/LLVMC/NoCompilationGraph.td
index 69df70133307..4182882c451f 100644
--- a/test/LLVMC/NoCompilationGraph.td
+++ b/test/LLVMC/NoCompilationGraph.td
@@ -1,6 +1,6 @@
// Check that the compilation graph is not required.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
-// RUN: %compile_cxx -fexceptions -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
diff --git a/test/LLVMC/OneOrMore.td b/test/LLVMC/OneOrMore.td
index 37fbc87fdfab..54fa62d1ff04 100644
--- a/test/LLVMC/OneOrMore.td
+++ b/test/LLVMC/OneOrMore.td
@@ -2,7 +2,7 @@
// The dummy tool and graph are required to silence warnings.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -fexceptions -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.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 c2641be7e645..8019c42634f3 100644
--- a/test/LLVMC/OptionPreprocessor.td
+++ b/test/LLVMC/OptionPreprocessor.td
@@ -1,7 +1,7 @@
// Test for the OptionPreprocessor and related functionality.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -fexceptions -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.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 4ecad2360ba0..1f5ecd1237f3 100644
--- a/test/LLVMC/OutputSuffixHook.td
+++ b/test/LLVMC/OutputSuffixHook.td
@@ -1,8 +1,8 @@
// Check that hooks can be invoked from 'output_suffix'.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -fexceptions -x c++ %t
-// XFAIL: *
+// RUN: %compile_cxx %t
+// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
@@ -13,7 +13,7 @@ def OptList : OptionList<[
]>;
def dummy_tool : Tool<[
-(cmd_line "dummy_cmd $INFILE"),
+(command "dummy_cmd"),
(in_language "dummy_lang"),
(out_language "dummy_lang"),
(actions (case
@@ -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")]>;
diff --git a/test/LLVMC/TestWarnings.td b/test/LLVMC/TestWarnings.td
index 0388cb0b0f1e..b0f57e97e0d8 100644
--- a/test/LLVMC/TestWarnings.td
+++ b/test/LLVMC/TestWarnings.td
@@ -5,4 +5,4 @@
include "llvm/CompilerDriver/Common.td"
-def OptList : OptionList<[(switch_option "Wall", (extern))]>;
+def OptList : OptionList<[(switch_option "Wall", (help "dummy"))]>;