Add a new InvalidateStructLayoutInfo method and some comments.

llvm-svn: 25303
This commit is contained in:
Chris Lattner 2006-01-14 00:06:42 +00:00
parent 0f223bbce2
commit 48c60c0285
1 changed files with 9 additions and 0 deletions

View File

@ -113,7 +113,16 @@ public:
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