mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-10 17:29:44 +00:00
AsmMatcher: Create operand classes before use, apparently records aren't visited
in the order they were declared. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94868 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ca1346122f
commit
a2f5e00347
@ -782,10 +782,16 @@ void AsmMatcherInfo::BuildRegisterClasses(CodeGenTarget &Target,
|
|||||||
void AsmMatcherInfo::BuildOperandClasses(CodeGenTarget &Target) {
|
void AsmMatcherInfo::BuildOperandClasses(CodeGenTarget &Target) {
|
||||||
std::vector<Record*> AsmOperands;
|
std::vector<Record*> AsmOperands;
|
||||||
AsmOperands = Records.getAllDerivedDefinitions("AsmOperandClass");
|
AsmOperands = Records.getAllDerivedDefinitions("AsmOperandClass");
|
||||||
|
|
||||||
|
// Pre-populate AsmOperandClasses map.
|
||||||
|
for (std::vector<Record*>::iterator it = AsmOperands.begin(),
|
||||||
|
ie = AsmOperands.end(); it != ie; ++it)
|
||||||
|
AsmOperandClasses[*it] = new ClassInfo();
|
||||||
|
|
||||||
unsigned Index = 0;
|
unsigned Index = 0;
|
||||||
for (std::vector<Record*>::iterator it = AsmOperands.begin(),
|
for (std::vector<Record*>::iterator it = AsmOperands.begin(),
|
||||||
ie = AsmOperands.end(); it != ie; ++it, ++Index) {
|
ie = AsmOperands.end(); it != ie; ++it, ++Index) {
|
||||||
ClassInfo *CI = new ClassInfo();
|
ClassInfo *CI = AsmOperandClasses[*it];
|
||||||
CI->Kind = ClassInfo::UserClass0 + Index;
|
CI->Kind = ClassInfo::UserClass0 + Index;
|
||||||
|
|
||||||
Init *Super = (*it)->getValueInit("SuperClass");
|
Init *Super = (*it)->getValueInit("SuperClass");
|
||||||
|
Loading…
Reference in New Issue
Block a user