mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-22 19:49:49 +00:00
llvmc: Allow multiple LanguageMaps.
llvm-svn: 111829
This commit is contained in:
parent
741dc5578b
commit
68d96f1d5c
@ -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!";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user