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
This commit is contained in:
Chris Lattner
2004-02-09 04:37:31 +00:00
parent 037b8b70d0
commit d21cd809b6
16 changed files with 61 additions and 73 deletions

View File

@ -222,9 +222,8 @@ std::ostream &CWriter::printType(std::ostream &Out, const Type *Ty,
const StructType *STy = cast<StructType>(Ty);
Out << NameSoFar + " {\n";
unsigned Idx = 0;
for (StructType::ElementTypes::const_iterator
I = STy->getElementTypes().begin(),
E = STy->getElementTypes().end(); I != E; ++I) {
for (StructType::element_iterator I = STy->element_begin(),
E = STy->element_end(); I != E; ++I) {
Out << " ";
printType(Out, *I, "field" + utostr(Idx++));
Out << ";\n";
@ -888,9 +887,8 @@ void CWriter::printContainedStructs(const Type *Ty,
//Check to see if we have already printed this struct
if (StructPrinted.count(STy) == 0) {
// Print all contained types first...
for (StructType::ElementTypes::const_iterator
I = STy->getElementTypes().begin(),
E = STy->getElementTypes().end(); I != E; ++I) {
for (StructType::element_iterator I = STy->element_begin(),
E = STy->element_end(); I != E; ++I) {
const Type *Ty1 = I->get();
if (isa<StructType>(Ty1) || isa<ArrayType>(Ty1))
printContainedStructs(*I, StructPrinted);