llvm.org GIT mirror llvm / 00a5b5b
llvmc: Allow multiple LanguageMaps. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111829 91177308-0d34-0410-b5e6-96231b3b80d8 Mikhail Glushenkov 9 years ago
1 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
26202620 {
26212621 O << "int PopulateLanguageMap (LanguageMap& langMap) {\n";
26222622
2623 // Get the relevant field out of RecordKeeper
2624 // TODO: change this to getAllDerivedDefinitions.
2625 const Record* LangMapRecord = Records.getDef("LanguageMap");
2626
2627 if (LangMapRecord) {
2628 ListInit* LangsToSuffixesList = LangMapRecord->getValueAsListInit("map");
2623 const RecordVector& LanguageMaps =
2624 Records.getAllDerivedDefinitions("LanguageMap");
2625
2626 for (RecordVector::const_iterator B = LanguageMaps.begin(),
2627 E = LanguageMaps.end(); B!=E; ++B) {
2628 ListInit* LangsToSuffixesList = (*B)->getValueAsListInit("map");
26292629 if (!LangsToSuffixesList)
26302630 throw "Error in the language map definition!";
26312631