[llvm-commits] CVS: llvm/include/llvm/Target/TargetData.h
Chris Lattner
sabre at nondot.org
Sat Feb 10 11:59:42 PST 2007
Changes in directory llvm/include/llvm/Target:
TargetData.h updated: 1.50 -> 1.51
---
Log message:
encapsulate the rest of the StructLayout members.
---
Diffs of the changes: (+9 -1)
TargetData.h | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletion(-)
Index: llvm/include/llvm/Target/TargetData.h
diff -u llvm/include/llvm/Target/TargetData.h:1.50 llvm/include/llvm/Target/TargetData.h:1.51
--- llvm/include/llvm/Target/TargetData.h:1.50 Sat Feb 10 13:55:17 2007
+++ llvm/include/llvm/Target/TargetData.h Sat Feb 10 13:59:22 2007
@@ -276,10 +276,18 @@
///
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.
///
More information about the llvm-commits
mailing list