summaryrefslogtreecommitdiff
path: root/utils/TableGen
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2010-08-23 19:24:16 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2010-08-23 19:24:16 +0000
commit00a5b5b2e97118e49aea0ad838eb2b249223a677 (patch)
tree432cecadf76fa0d039fb0dc0d804b4926254dccd /utils/TableGen
parent316abba6b7b744a2f6795087eab25943a1247a41 (diff)
downloadllvm-00a5b5b2e97118e49aea0ad838eb2b249223a677.tar.gz
llvm-00a5b5b2e97118e49aea0ad838eb2b249223a677.tar.bz2
llvm-00a5b5b2e97118e49aea0ad838eb2b249223a677.tar.xz
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.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/TableGen/LLVMCConfigurationEmitter.cpp b/utils/TableGen/LLVMCConfigurationEmitter.cpp
index 6927b01bd4..38b3713053 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!";