diff options
author | Mikhail Glushenkov <foldr@codedgers.com> | 2010-08-23 19:24:16 +0000 |
---|---|---|
committer | Mikhail Glushenkov <foldr@codedgers.com> | 2010-08-23 19:24:16 +0000 |
commit | 00a5b5b2e97118e49aea0ad838eb2b249223a677 (patch) | |
tree | 432cecadf76fa0d039fb0dc0d804b4926254dccd /utils/TableGen | |
parent | 316abba6b7b744a2f6795087eab25943a1247a41 (diff) | |
download | external_llvm-00a5b5b2e97118e49aea0ad838eb2b249223a677.zip external_llvm-00a5b5b2e97118e49aea0ad838eb2b249223a677.tar.gz external_llvm-00a5b5b2e97118e49aea0ad838eb2b249223a677.tar.bz2 |
llvmc: Allow multiple LanguageMaps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111829 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen')
-rw-r--r-- | utils/TableGen/LLVMCConfigurationEmitter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/TableGen/LLVMCConfigurationEmitter.cpp b/utils/TableGen/LLVMCConfigurationEmitter.cpp index 6927b01..38b3713 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!"; |