From: Chris Lattner Date: Sun, 13 Mar 2005 19:04:04 +0000 (+0000) Subject: add a helper method X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=977df767228a1754d17c8624c33138325e5dbf1b;p=oota-llvm.git add a helper method git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20578 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Target/TargetData.h b/include/llvm/Target/TargetData.h index 3879b74c7e5..eb4baa999c2 100644 --- a/include/llvm/Target/TargetData.h +++ b/include/llvm/Target/TargetData.h @@ -119,6 +119,11 @@ public: std::vector 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);