mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 06:32:09 +00:00
llvmc: Allow multiple LanguageMaps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111829 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
316abba6b7
commit
00a5b5b2e9
@ -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…
x
Reference in New Issue
Block a user