aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Target
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-10 19:59:22 +0000
committerChris Lattner <sabre@nondot.org>2007-02-10 19:59:22 +0000
commitb0c39a3b4d1daa93d339493751976944b6422fd5 (patch)
tree4d9453ed7216ac3d8eca387291edad4de4f6e5cc /include/llvm/Target
parentb1919e2f08ecb37140af676fd2916f8d5ed7df3d (diff)
downloadexternal_llvm-b0c39a3b4d1daa93d339493751976944b6422fd5.zip
external_llvm-b0c39a3b4d1daa93d339493751976944b6422fd5.tar.gz
external_llvm-b0c39a3b4d1daa93d339493751976944b6422fd5.tar.bz2
encapsulate the rest of the StructLayout members.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34157 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target')
-rw-r--r--include/llvm/Target/TargetData.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/llvm/Target/TargetData.h b/include/llvm/Target/TargetData.h
index 516aae7..18f9d3b 100644
--- a/include/llvm/Target/TargetData.h
+++ b/include/llvm/Target/TargetData.h
@@ -276,10 +276,18 @@ public:
///
class StructLayout {
std::vector<uint64_t> MemberOffsets;
-public:
unsigned StructAlignment;
uint64_t StructSize;
+public:
+ uint64_t getSizeInBytes() const {
+ return StructSize;
+ }
+
+ unsigned getAlignment() const {
+ return StructAlignment;
+ }
+
/// getElementContainingOffset - Given a valid offset into the structure,
/// return the structure index that contains it.
///