[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Feb 8 22:38:50 PST 2004
Changes in directory llvm/lib/Analysis/DataStructure:
DataStructure.cpp updated: 1.155 -> 1.156
---
Log message:
Adjust to the changed StructType interface. In particular, getElementTypes() is gone.
---
Diffs of the changes: (+6 -6)
Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.155 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.156
--- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.155 Sat Feb 7 19:51:48 2004
+++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Sun Feb 8 22:37:17 2004
@@ -241,7 +241,7 @@
StackState &SS = Stack.back();
if (const StructType *ST = dyn_cast<StructType>(SS.Ty)) {
++SS.Idx;
- if (SS.Idx != ST->getElementTypes().size()) {
+ if (SS.Idx != ST->getNumElements()) {
const StructLayout *SL = TD.getStructLayout(ST);
SS.Offset += SL->MemberOffsets[SS.Idx]-SL->MemberOffsets[SS.Idx-1];
return;
@@ -266,14 +266,14 @@
while (!Stack.empty() && !Stack.back().Ty->isFirstClassType()) {
StackState &SS = Stack.back();
if (const StructType *ST = dyn_cast<StructType>(SS.Ty)) {
- if (ST->getElementTypes().empty()) {
+ if (ST->getNumElements() == 0) {
assert(SS.Idx == 0);
PopStackAndAdvance();
} else {
// Step into the structure...
- assert(SS.Idx < ST->getElementTypes().size());
+ assert(SS.Idx < ST->getNumElements());
const StructLayout *SL = TD.getStructLayout(ST);
- Stack.push_back(StackState(ST->getElementTypes()[SS.Idx],
+ Stack.push_back(StackState(ST->getElementType(SS.Idx),
SS.Offset+SL->MemberOffsets[SS.Idx]));
}
} else {
@@ -443,7 +443,7 @@
/* empty */;
// The offset we are looking for must be in the i'th element...
- SubType = STy->getElementTypes()[i];
+ SubType = STy->getElementType(i);
O += SL.MemberOffsets[i];
break;
}
@@ -496,7 +496,7 @@
NextPadSize = SL.MemberOffsets[1];
else
NextPadSize = SubTypeSize;
- NextSubType = STy->getElementTypes()[0];
+ NextSubType = STy->getElementType(0);
NextSubTypeSize = TD.getTypeSize(NextSubType);
break;
}
More information about the llvm-commits
mailing list