mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-07 11:33:44 +00:00
Final cleanups:
- Privatize a typedef. - Call the InvalidateEntry when refining a type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90655 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
dc492e0370
commit
32bc2362a1
@ -318,9 +318,7 @@ unsigned TargetData::getAlignmentInfo(AlignTypeEnum AlignType,
|
|||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
class StructLayoutMap : public AbstractTypeUser {
|
class StructLayoutMap : public AbstractTypeUser {
|
||||||
public:
|
|
||||||
typedef DenseMap<const StructType*, StructLayout*> LayoutInfoTy;
|
typedef DenseMap<const StructType*, StructLayout*> LayoutInfoTy;
|
||||||
private:
|
|
||||||
LayoutInfoTy LayoutInfo;
|
LayoutInfoTy LayoutInfo;
|
||||||
|
|
||||||
/// refineAbstractType - The callback method invoked when an abstract type is
|
/// refineAbstractType - The callback method invoked when an abstract type is
|
||||||
@ -329,12 +327,7 @@ private:
|
|||||||
///
|
///
|
||||||
virtual void refineAbstractType(const DerivedType *OldTy,
|
virtual void refineAbstractType(const DerivedType *OldTy,
|
||||||
const Type *) {
|
const Type *) {
|
||||||
const StructType *STy = cast<const StructType>(OldTy);
|
InvalidateEntry(cast<const StructType>(OldTy));
|
||||||
LayoutInfoTy::iterator Iter = LayoutInfo.find(STy);
|
|
||||||
Iter->second->~StructLayout();
|
|
||||||
free(Iter->second);
|
|
||||||
LayoutInfo.erase(Iter);
|
|
||||||
OldTy->removeAbstractTypeUser(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// typeBecameConcrete - The other case which AbstractTypeUsers must be aware
|
/// typeBecameConcrete - The other case which AbstractTypeUsers must be aware
|
||||||
@ -343,12 +336,7 @@ private:
|
|||||||
/// This method notifies ATU's when this occurs for a type.
|
/// This method notifies ATU's when this occurs for a type.
|
||||||
///
|
///
|
||||||
virtual void typeBecameConcrete(const DerivedType *AbsTy) {
|
virtual void typeBecameConcrete(const DerivedType *AbsTy) {
|
||||||
const StructType *STy = cast<const StructType>(AbsTy);
|
InvalidateEntry(cast<const StructType>(AbsTy));
|
||||||
LayoutInfoTy::iterator Iter = LayoutInfo.find(STy);
|
|
||||||
Iter->second->~StructLayout();
|
|
||||||
free(Iter->second);
|
|
||||||
LayoutInfo.erase(Iter);
|
|
||||||
AbsTy->removeAbstractTypeUser(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user