mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +00:00
simplify and speed up recursive type processing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34126 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
94bec4fbf8
commit
25c0293f20
@ -362,16 +362,14 @@ unsigned SlotCalculator::getOrCreateTypeSlot(const Type *Ty) {
|
||||
// global { \2 * } { { \2 }* null }
|
||||
//
|
||||
unsigned ResultSlot = doInsertType(Ty);
|
||||
SC_DEBUG(" Inserted type: " << Ty->getDescription() << " slot=" <<
|
||||
ResultSlot << "\n");
|
||||
|
||||
// Loop over any contained types in the definition... in post
|
||||
// order.
|
||||
for (po_iterator<const Type*> I = po_begin(Ty), E = po_end(Ty);
|
||||
I != E; ++I) {
|
||||
if (*I != Ty) {
|
||||
if (*I != Ty && !TypeMap.count(*I)) {
|
||||
// If we haven't seen this sub type before, add it to our type table!
|
||||
getOrCreateTypeSlot(*I);
|
||||
doInsertType(*I);
|
||||
}
|
||||
}
|
||||
return ResultSlot;
|
||||
|
Loading…
Reference in New Issue
Block a user