add a helper method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20578 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-03-13 19:04:04 +00:00
parent 84e2dc2d5d
commit 977df76722

View File

@ -119,6 +119,11 @@ public:
std::vector<uint64_t> MemberOffsets;
uint64_t StructSize;
unsigned StructAlignment;
/// getElementContainingOffset - Given a valid offset into the structure,
/// return the structure index that contains it.
unsigned getElementContainingOffset(uint64_t Offset) const;
private:
friend class TargetData; // Only TargetData can create this class
StructLayout(const StructType *ST, const TargetData &TD);