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 5// 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")]>; 30