aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/TargetData.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-07-15 05:21:59 +0000
committerChris Lattner <sabre@nondot.org>2011-07-15 05:21:59 +0000
commitef58218b8dd9afc0251eeb673c10d448da45d281 (patch)
treeaaffaff26f37b66a2bd54ab7a033e52a7ef78597 /lib/Target/TargetData.cpp
parented0e021643be9a94d0ef7de2c567a3bc51df78fa (diff)
downloadexternal_llvm-ef58218b8dd9afc0251eeb673c10d448da45d281.zip
external_llvm-ef58218b8dd9afc0251eeb673c10d448da45d281.tar.gz
external_llvm-ef58218b8dd9afc0251eeb673c10d448da45d281.tar.bz2
remove the InvalidateStructLayoutInfo API, which is dead and unnecessary now
that type refinement is toast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135245 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetData.cpp')
-rw-r--r--lib/Target/TargetData.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp
index b2c4b21..17d022a 100644
--- a/lib/Target/TargetData.cpp
+++ b/lib/Target/TargetData.cpp
@@ -329,15 +329,6 @@ public:
}
}
- void InvalidateEntry(const StructType *Ty) {
- LayoutInfoTy::iterator I = LayoutInfo.find(Ty);
- if (I == LayoutInfo.end()) return;
-
- I->second->~StructLayout();
- free(I->second);
- LayoutInfo.erase(I);
- }
-
StructLayout *&operator[](const StructType *STy) {
return LayoutInfo[STy];
}
@@ -375,16 +366,6 @@ const StructLayout *TargetData::getStructLayout(const StructType *Ty) const {
return L;
}
-/// InvalidateStructLayoutInfo - TargetData speculatively caches StructLayout
-/// objects. If a TargetData object is alive when types are being refined and
-/// removed, this method must be called whenever a StructType is removed to
-/// avoid a dangling pointer in this cache.
-void TargetData::InvalidateStructLayoutInfo(const StructType *Ty) const {
- if (!LayoutMap) return; // No cache.
-
- static_cast<StructLayoutMap*>(LayoutMap)->InvalidateEntry(Ty);
-}
-
std::string TargetData::getStringRepresentation() const {
std::string Result;
raw_string_ostream OS(Result);