Changes in directory llvm/lib/Target:
TargetData.cpp updated: 1.90 -> 1.91 --- Log message: add a typedef --- Diffs of the changes: (+8 -9) TargetData.cpp | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-) Index: llvm/lib/Target/TargetData.cpp diff -u llvm/lib/Target/TargetData.cpp:1.90 llvm/lib/Target/TargetData.cpp:1.91 --- llvm/lib/Target/TargetData.cpp:1.90 Sat Feb 10 14:15:41 2007 +++ llvm/lib/Target/TargetData.cpp Sat Feb 10 14:18:06 2007 @@ -208,17 +208,18 @@ /// targets with cached elements should have been destroyed. /// typedef std::pair<const TargetData*,const StructType*> LayoutKey; -static ManagedStatic<std::map<LayoutKey, StructLayout*> > LayoutInfo; +typedef std::map<LayoutKey, StructLayout*> LayoutInfoTy; +static ManagedStatic<LayoutInfoTy> LayoutInfo; TargetData::~TargetData() { if (LayoutInfo.isConstructed()) { // Remove any layouts for this TD. - std::map<LayoutKey, StructLayout*> &TheMap = *LayoutInfo; - std::map<LayoutKey, StructLayout*>::iterator + LayoutInfoTy &TheMap = *LayoutInfo; + LayoutInfoTy::iterator I = TheMap.lower_bound(LayoutKey(this, (const StructType*)0)); - for (std::map<LayoutKey, StructLayout*>::iterator E = TheMap.end(); + for (LayoutInfoTy::iterator E = TheMap.end(); I != E && I->first.first == this; ) { I->second->~StructLayout(); free(I->second); @@ -228,10 +229,9 @@ } const StructLayout *TargetData::getStructLayout(const StructType *Ty) const { - std::map<LayoutKey, StructLayout*> &TheMap = *LayoutInfo; + LayoutInfoTy &TheMap = *LayoutInfo; - std::map<LayoutKey, StructLayout*>::iterator - I = TheMap.lower_bound(LayoutKey(this, Ty)); + LayoutInfoTy::iterator I = TheMap.lower_bound(LayoutKey(this, Ty)); if (I != TheMap.end() && I->first.first == this && I->first.second == Ty) return I->second; @@ -253,8 +253,7 @@ void TargetData::InvalidateStructLayoutInfo(const StructType *Ty) const { if (!LayoutInfo.isConstructed()) return; // No cache. - std::map<LayoutKey, StructLayout*>::iterator I = - LayoutInfo->find(LayoutKey(this, Ty)); + LayoutInfoTy::iterator I = LayoutInfo->find(LayoutKey(this, Ty)); if (I != LayoutInfo->end()) { I->second->~StructLayout(); free(I->second); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits