diff --git a/llvm/include/llvm/Target/TargetData.h b/llvm/include/llvm/Target/TargetData.h index 3879b74c7e5e..eb4baa999c2c 100644 --- a/llvm/include/llvm/Target/TargetData.h +++ b/llvm/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);