1 // Check that LanguageMap is processed properly.
2 // RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
3 // RUN: FileCheck -input-file %t %s
4 // RUN: %compile_cxx %t
7 include "llvm/CompilerDriver/Common.td"
9 def OptList : OptionList<[
10 (switch_option "dummy1", (help "none"))
13 def dummy_tool : Tool<[
14 (command "dummy_cmd"),
15 (in_language "dummy_lang"),
16 (out_language "dummy_lang"),
18 (switch_on "dummy1"), (forward "dummy1")))
21 def 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")
29 def DummyGraph : CompilationGraph<[(edge "root", "dummy_tool")]>;