[llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Feb 8 22:44:00 PST 2004
Changes in directory llvm/lib/CWriter:
Writer.cpp updated: 1.153 -> 1.154
---
Log message:
Adjust to the changed StructType interface. In particular, getElementTypes() is gone.
---
Diffs of the changes: (+4 -6)
Index: llvm/lib/CWriter/Writer.cpp
diff -u llvm/lib/CWriter/Writer.cpp:1.153 llvm/lib/CWriter/Writer.cpp:1.154
--- llvm/lib/CWriter/Writer.cpp:1.153 Sun Feb 8 22:13:47 2004
+++ llvm/lib/CWriter/Writer.cpp Sun Feb 8 22:37:29 2004
@@ -222,9 +222,8 @@
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 @@
//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);
More information about the llvm-commits
mailing list