[llvm-commits] CVS: llvm/lib/Target/TargetData.cpp
Chris Lattner
sabre at nondot.org
Sat Feb 10 11:55:48 PST 2007
Changes in directory llvm/lib/Target:
TargetData.cpp updated: 1.87 -> 1.88
---
Log message:
Privatize StructLayout::MemberOffsets, adding an accessor
---
Diffs of the changes: (+1 -2)
TargetData.cpp | 3 +--
1 files changed, 1 insertion(+), 2 deletions(-)
Index: llvm/lib/Target/TargetData.cpp
diff -u llvm/lib/Target/TargetData.cpp:1.87 llvm/lib/Target/TargetData.cpp:1.88
--- llvm/lib/Target/TargetData.cpp:1.87 Sat Feb 10 13:43:18 2007
+++ llvm/lib/Target/TargetData.cpp Sat Feb 10 13:55:17 2007
@@ -466,8 +466,7 @@
const StructLayout *Layout = getStructLayout(STy);
// Add in the offset, as calculated by the structure layout info...
- assert(FieldNo < Layout->MemberOffsets.size() &&"FieldNo out of range!");
- Result += Layout->MemberOffsets[FieldNo];
+ Result += Layout->getElementOffset(FieldNo);
// Update Ty to refer to current element
Ty = STy->getElementType(FieldNo);
More information about the llvm-commits
mailing list