summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-20 07:41:15 +0000
committerChris Lattner <sabre@nondot.org>2010-01-20 07:41:15 +0000
commit71601e8b3bd1bed8064a66a15c1d8a0224870216 (patch)
treed6b95827cf1d789d4de058eccac05cadade6997e /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parentab62196c9de5eb6fb46ed20641fa627c1301ee15 (diff)
downloadbcm5719-llvm-71601e8b3bd1bed8064a66a15c1d8a0224870216.tar.gz
bcm5719-llvm-71601e8b3bd1bed8064a66a15c1d8a0224870216.zip
eliminate some uses of AsmPrinter::EmitIntXXX
llvm-svn: 93996
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index bb786df9e1a..4c5e079f03b 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1086,8 +1086,7 @@ static void EmitGlobalConstantArray(const ConstantArray *CA, unsigned AddrSpace,
static void EmitGlobalConstantVector(const ConstantVector *CV,
unsigned AddrSpace, AsmPrinter &AP) {
- const VectorType *VTy = CV->getType();
- for (unsigned i = 0, e = VTy->getNumElements(); i != e; ++i)
+ for (unsigned i = 0, e = CV->getType()->getNumElements(); i != e; ++i)
AP.EmitGlobalConstant(CV->getOperand(i), AddrSpace);
}
@@ -1099,16 +1098,16 @@ static void EmitGlobalConstantStruct(const ConstantStruct *CS,
const StructLayout *Layout = TD->getStructLayout(CS->getType());
uint64_t SizeSoFar = 0;
for (unsigned i = 0, e = CS->getNumOperands(); i != e; ++i) {
- const Constant *field = CS->getOperand(i);
+ const Constant *Field = CS->getOperand(i);
// Check if padding is needed and insert one or more 0s.
- uint64_t FieldSize = TD->getTypeAllocSize(field->getType());
+ uint64_t FieldSize = TD->getTypeAllocSize(Field->getType());
uint64_t PadSize = ((i == e-1 ? Size : Layout->getElementOffset(i+1))
- Layout->getElementOffset(i)) - FieldSize;
SizeSoFar += FieldSize + PadSize;
// Now print the actual field value.
- AP.EmitGlobalConstant(field, AddrSpace);
+ AP.EmitGlobalConstant(Field, AddrSpace);
// Insert padding - this may include padding to increase the size of the
// current field up to the ABI size (if the struct is not packed) as well
OpenPOWER on IntegriCloud