[llvm-commits] CVS: llvm/lib/Transforms/LevelRaise.cpp TransformInternals.cpp

Chris Lattner lattner at cs.uiuc.edu
Sun Feb 8 22:41:27 PST 2004


Changes in directory llvm/lib/Transforms:

LevelRaise.cpp updated: 1.94 -> 1.95
TransformInternals.cpp updated: 1.43 -> 1.44

---
Log message:

Adjust to the changed StructType interface.  In particular, getElementTypes() is gone.


---
Diffs of the changes:  (+3 -3)

Index: llvm/lib/Transforms/LevelRaise.cpp
diff -u llvm/lib/Transforms/LevelRaise.cpp:1.94 llvm/lib/Transforms/LevelRaise.cpp:1.95
--- llvm/lib/Transforms/LevelRaise.cpp:1.94	Sun Feb  8 18:20:55 2004
+++ llvm/lib/Transforms/LevelRaise.cpp	Sun Feb  8 22:37:31 2004
@@ -375,12 +375,12 @@
             const Type *IdxType;
             if (const StructType *CurSTy = dyn_cast<StructType>(CurCTy)) {
               // Check for a zero element struct type... if we have one, bail.
-              if (CurSTy->getElementTypes().size() == 0) break;
+              if (CurSTy->getNumElements() == 0) break;
             
               // Grab the first element of the struct type, which must lie at
               // offset zero in the struct.
               //
-              ElTy = CurSTy->getElementTypes()[0];
+              ElTy = CurSTy->getElementType(0);
               IdxType = Type::UByteTy;   // FIXME when PR82 is fixed.
             } else {
               ElTy = cast<ArrayType>(CurCTy)->getElementType();


Index: llvm/lib/Transforms/TransformInternals.cpp
diff -u llvm/lib/Transforms/TransformInternals.cpp:1.43 llvm/lib/Transforms/TransformInternals.cpp:1.44
--- llvm/lib/Transforms/TransformInternals.cpp:1.43	Thu Jan  8 23:53:38 2004
+++ llvm/lib/Transforms/TransformInternals.cpp	Sun Feb  8 22:37:31 2004
@@ -62,7 +62,7 @@
   uint64_t ThisOffset;
   const Type *NextType;
   if (const StructType *STy = dyn_cast<StructType>(Ty)) {
-    if (STy->getElementTypes().empty()) {
+    if (STy->getNumElements()) {
       Offset = 0;
       return STy;
     }





More information about the llvm-commits mailing list