mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Refactor some code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90639 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
eecb9919a4
commit
5681689795
@ -367,6 +367,18 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void InvalidateEntry(const StructType *Ty) {
|
||||
LayoutInfoTy::iterator I = this->find(Ty);
|
||||
if (I == this->end()) return;
|
||||
|
||||
I->second->~StructLayout();
|
||||
free(I->second);
|
||||
this->erase(I);
|
||||
|
||||
if (Ty->isAbstract())
|
||||
Ty->removeAbstractTypeUser(this);
|
||||
}
|
||||
|
||||
LayoutInfoTy::iterator end() {
|
||||
return LayoutInfo.end();
|
||||
}
|
||||
@ -427,15 +439,7 @@ void TargetData::InvalidateStructLayoutInfo(const StructType *Ty) const {
|
||||
if (!LayoutMap) return; // No cache.
|
||||
|
||||
StructLayoutMap *STM = static_cast<StructLayoutMap*>(LayoutMap);
|
||||
StructLayoutMap::LayoutInfoTy::iterator I = STM->find(Ty);
|
||||
if (I == STM->end()) return;
|
||||
|
||||
I->second->~StructLayout();
|
||||
free(I->second);
|
||||
STM->erase(I);
|
||||
|
||||
if (Ty->isAbstract())
|
||||
Ty->removeAbstractTypeUser(STM);
|
||||
STM->InvalidateEntry(Ty);
|
||||
}
|
||||
|
||||
std::string TargetData::getStringRepresentation() const {
|
||||
|
Loading…
Reference in New Issue
Block a user