Adjust to the changed StructType interface. In particular, getElementTypes() is gone.
llvm-svn: 11228
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp
index 3ed2312..5fc7a89 100644
--- a/llvm/lib/VMCore/AsmWriter.cpp
+++ b/llvm/lib/VMCore/AsmWriter.cpp
@@ -169,10 +169,9 @@
case Type::StructTyID: {
const StructType *STy = cast<StructType>(Ty);
Result = "{ ";
- for (StructType::ElementTypes::const_iterator
- I = STy->getElementTypes().begin(),
- E = STy->getElementTypes().end(); I != E; ++I) {
- if (I != STy->getElementTypes().begin())
+ for (StructType::element_iterator I = STy->element_begin(),
+ E = STy->element_end(); I != E; ++I) {
+ if (I != STy->element_begin())
Result += ", ";
Result += calcTypeName(*I, TypeStack, TypeNames);
}
@@ -529,10 +528,9 @@
Out << ")";
} else if (const StructType *STy = dyn_cast<StructType>(Ty)) {
Out << "{ ";
- for (StructType::ElementTypes::const_iterator
- I = STy->getElementTypes().begin(),
- E = STy->getElementTypes().end(); I != E; ++I) {
- if (I != STy->getElementTypes().begin())
+ for (StructType::element_iterator I = STy->element_begin(),
+ E = STy->element_end(); I != E; ++I) {
+ if (I != STy->element_begin())
Out << ", ";
printType(*I);
}