[llvm-commits] CVS: llvm/include/llvm/Target/TargetData.h
Chris Lattner
lattner at cs.uiuc.edu
Fri Jan 13 16:06:54 PST 2006
Changes in directory llvm/include/llvm/Target:
TargetData.h updated: 1.32 -> 1.33
---
Log message:
Add a new InvalidateStructLayoutInfo method and some comments.
---
Diffs of the changes: (+9 -0)
TargetData.h | 9 +++++++++
1 files changed, 9 insertions(+)
Index: llvm/include/llvm/Target/TargetData.h
diff -u llvm/include/llvm/Target/TargetData.h:1.32 llvm/include/llvm/Target/TargetData.h:1.33
--- llvm/include/llvm/Target/TargetData.h:1.32 Sat Apr 23 17:35:26 2005
+++ llvm/include/llvm/Target/TargetData.h Fri Jan 13 18:06:42 2006
@@ -113,7 +113,16 @@
uint64_t getIndexedOffset(const Type *Ty,
const std::vector<Value*> &Indices) const;
+ /// getStructLayout - Return a StructLayout object, indicating the alignment
+ /// of the struct, its size, and the offsets of its fields. Note that this
+ /// information is lazily cached.
const StructLayout *getStructLayout(const StructType *Ty) const;
+
+ /// 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 InvalidateStructLayoutInfo(const StructType *Ty) const;
};
/// StructLayout - used to lazily calculate structure layout information for a
More information about the llvm-commits
mailing list