diff options
author | Chris Lattner <sabre@nondot.org> | 2004-02-09 04:37:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-02-09 04:37:31 +0000 |
commit | d21cd809b656d3011ec089536857e048e037159c (patch) | |
tree | 131bf120f81f62962ffbb7520d785b63cf8d4b16 /lib/Analysis/DataStructure/DataStructure.cpp | |
parent | 037b8b70d04ce214464c89d2480811484f9ec13d (diff) |
Adjust to the changed StructType interface. In particular, getElementTypes() is gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11228 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/DataStructure.cpp')
-rw-r--r-- | lib/Analysis/DataStructure/DataStructure.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index 24ccf91357..f67d0d613f 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -241,7 +241,7 @@ namespace { 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 @@ namespace { 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 @@ bool DSNode::mergeTypeInfo(const Type *NewTy, unsigned Offset, /* 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 @@ bool DSNode::mergeTypeInfo(const Type *NewTy, unsigned Offset, NextPadSize = SL.MemberOffsets[1]; else NextPadSize = SubTypeSize; - NextSubType = STy->getElementTypes()[0]; + NextSubType = STy->getElementType(0); NextSubTypeSize = TD.getTypeSize(NextSubType); break; } |