mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
Ignore X = X assignments that was causing Alkis's rewrite of X86.td to crash
tblgen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11948 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7b6ee7d8f1
commit
81d50adfaf
@ -76,6 +76,13 @@ static void setValue(const std::string &ValName,
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Do not allow assignments like 'X = X'. This will just cause infinite loops
|
||||
// in the resolution machinery.
|
||||
if (!BitList)
|
||||
if (VarInit *VI = dynamic_cast<VarInit*>(V))
|
||||
if (VI->getName() == ValName)
|
||||
return;
|
||||
|
||||
// If we are assigning to a subset of the bits in the value... then we must be
|
||||
// assigning to a field of BitsRecTy, which must have a BitsInit
|
||||
// initializer...
|
||||
@ -154,7 +161,6 @@ static void addSubClass(Record *SC, const std::vector<Init*> &TemplateArgs) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Since everything went well, we can now set the "superclass" list for the
|
||||
// current record.
|
||||
const std::vector<Record*> &SCs = SC->getSuperClasses();
|
||||
|
Loading…
Reference in New Issue
Block a user