blob: a0502142e6d72f80a5be0bdc5ab9147cdcbe2e5a [file] [log] [blame]
Mikhail Glushenkovd9a73162010-08-23 23:21:23 +00001// Check that LanguageMap is processed properly.
2// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
3// RUN: FileCheck -input-file %t %s
Michael J. Spencer06b7f582010-08-30 14:49:00 +00004// RUN: %compile_cxx %t
Mikhail Glushenkovd9a73162010-08-23 23:21:23 +00005// XFAIL: vg_leak
6
7include "llvm/CompilerDriver/Common.td"
8
9def OptList : OptionList<[
10(switch_option "dummy1", (help "none"))
11]>;
12
13def dummy_tool : Tool<[
14(command "dummy_cmd"),
15(in_language "dummy_lang"),
16(out_language "dummy_lang"),
17(actions (case
18 (switch_on "dummy1"), (forward "dummy1")))
19]>;
20
21def lang_map : LanguageMap<[
22 // CHECK: langMap["dummy"] = "dummy_lang"
23 // CHECK: langMap["DUM"] = "dummy_lang"
24 (lang_to_suffixes "dummy_lang", ["dummy", "DUM"]),
25 // CHECK: langMap["DUM2"] = "dummy_lang_2"
26 (lang_to_suffixes "dummy_lang_2", "DUM2")
27]>;
28
29def DummyGraph : CompilationGraph<[(edge "root", "dummy_tool")]>;