[llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp

Chris Lattner sabre at nondot.org
Sat Feb 10 11:59:42 PST 2007



Changes in directory llvm/lib/CodeGen:

AsmPrinter.cpp updated: 1.147 -> 1.148
---
Log message:

encapsulate the rest of the StructLayout members.


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

 AsmPrinter.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/CodeGen/AsmPrinter.cpp
diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.147 llvm/lib/CodeGen/AsmPrinter.cpp:1.148
--- llvm/lib/CodeGen/AsmPrinter.cpp:1.147	Sat Feb 10 13:55:17 2007
+++ llvm/lib/CodeGen/AsmPrinter.cpp	Sat Feb 10 13:59:22 2007
@@ -738,7 +738,7 @@
 
       // Check if padding is needed and insert one or more 0s.
       uint64_t fieldSize = TD->getTypeSize(field->getType());
-      uint64_t padSize = ((i == e-1? cvsLayout->StructSize
+      uint64_t padSize = ((i == e-1? cvsLayout->getSizeInBytes()
                            : cvsLayout->getElementOffset(i+1))
                           - cvsLayout->getElementOffset(i)) - fieldSize;
       sizeSoFar += fieldSize + padSize;
@@ -749,7 +749,7 @@
       // Insert the field padding unless it's zero bytes...
       EmitZeros(padSize);
     }
-    assert(sizeSoFar == cvsLayout->StructSize &&
+    assert(sizeSoFar == cvsLayout->getSizeInBytes() &&
            "Layout of constant struct may be incorrect!");
     return;
   } else if (const ConstantFP *CFP = dyn_cast<ConstantFP>(CV)) {






More information about the llvm-commits mailing list