From 00a5b5b2e97118e49aea0ad838eb2b249223a677 Mon Sep 17 00:00:00 2001 From: Mikhail Glushenkov Date: Mon, 23 Aug 2010 19:24:16 +0000 Subject: [PATCH] llvmc: Allow multiple LanguageMaps. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111829 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/LLVMCConfigurationEmitter.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/utils/TableGen/LLVMCConfigurationEmitter.cpp b/utils/TableGen/LLVMCConfigurationEmitter.cpp index 6927b01bd40..38b3713053c 100644 --- a/utils/TableGen/LLVMCConfigurationEmitter.cpp +++ b/utils/TableGen/LLVMCConfigurationEmitter.cpp @@ -2621,12 +2621,12 @@ void EmitPopulateLanguageMap (const RecordKeeper& Records, raw_ostream& O) { O << "int PopulateLanguageMap (LanguageMap& langMap) {\n"; - // Get the relevant field out of RecordKeeper - // TODO: change this to getAllDerivedDefinitions. - const Record* LangMapRecord = Records.getDef("LanguageMap"); + const RecordVector& LanguageMaps = + Records.getAllDerivedDefinitions("LanguageMap"); - if (LangMapRecord) { - ListInit* LangsToSuffixesList = LangMapRecord->getValueAsListInit("map"); + for (RecordVector::const_iterator B = LanguageMaps.begin(), + E = LanguageMaps.end(); B!=E; ++B) { + ListInit* LangsToSuffixesList = (*B)->getValueAsListInit("map"); if (!LangsToSuffixesList) throw "Error in the language map definition!"; -- 2.11.0