summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-12-05 07:46:49 +0000
committerBill Wendling <isanbard@gmail.com>2009-12-05 07:46:49 +0000
commitfa3f115ec4a185f826d70c3fcfac1ffe1a470b7f (patch)
tree6ce243d89b023a7b2e758ffad4ff4a6be06ecba0 /llvm/lib/Target
parentf89986235d8c3bc317463f332b41a8dcf7833179 (diff)
downloadbcm5719-llvm-fa3f115ec4a185f826d70c3fcfac1ffe1a470b7f.tar.gz
bcm5719-llvm-fa3f115ec4a185f826d70c3fcfac1ffe1a470b7f.zip
Final cleanups:
- Privatize a typedef. - Call the InvalidateEntry when refining a type. llvm-svn: 90655
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/TargetData.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/llvm/lib/Target/TargetData.cpp b/llvm/lib/Target/TargetData.cpp
index 2c1c5e63551..2a5b572a115 100644
--- a/llvm/lib/Target/TargetData.cpp
+++ b/llvm/lib/Target/TargetData.cpp
@@ -318,9 +318,7 @@ unsigned TargetData::getAlignmentInfo(AlignTypeEnum AlignType,
namespace {
class StructLayoutMap : public AbstractTypeUser {
-public:
typedef DenseMap<const StructType*, StructLayout*> LayoutInfoTy;
-private:
LayoutInfoTy LayoutInfo;
/// refineAbstractType - The callback method invoked when an abstract type is
@@ -329,12 +327,7 @@ private:
///
virtual void refineAbstractType(const DerivedType *OldTy,
const Type *) {
- const StructType *STy = cast<const StructType>(OldTy);
- LayoutInfoTy::iterator Iter = LayoutInfo.find(STy);
- Iter->second->~StructLayout();
- free(Iter->second);
- LayoutInfo.erase(Iter);
- OldTy->removeAbstractTypeUser(this);
+ InvalidateEntry(cast<const StructType>(OldTy));
}
/// 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.
///
virtual void typeBecameConcrete(const DerivedType *AbsTy) {
- const StructType *STy = cast<const StructType>(AbsTy);
- LayoutInfoTy::iterator Iter = LayoutInfo.find(STy);
- Iter->second->~StructLayout();
- free(Iter->second);
- LayoutInfo.erase(Iter);
- AbsTy->removeAbstractTypeUser(this);
+ InvalidateEntry(cast<const StructType>(AbsTy));
}
public:
OpenPOWER on IntegriCloud