diff options
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/Sparc/EmitAssembly.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Target/Sparc/SparcInstrSelection.cpp | 16 | ||||
-rw-r--r-- | llvm/lib/Target/TargetData.cpp | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/llvm/lib/Target/Sparc/EmitAssembly.cpp b/llvm/lib/Target/Sparc/EmitAssembly.cpp index 385ffffe56f..032faf12d65 100644 --- a/llvm/lib/Target/Sparc/EmitAssembly.cpp +++ b/llvm/lib/Target/Sparc/EmitAssembly.cpp @@ -612,10 +612,10 @@ SparcAsmPrinter::printGlobalVariable(const GlobalVariable* GV) printConstant(GV->getInitializer(), getID(GV)); else { toAsm << "\t.align\t" - << TypeToAlignment(GV->getType()->getValueType(), Target) << endl; + << TypeToAlignment(GV->getType()->getElementType(), Target) << endl; toAsm << "\t.type\t" << getID(GV) << ",#object" << endl; toAsm << "\t.reserve\t" << getID(GV) << "," - << TypeToSize(GV->getType()->getValueType(), Target) + << TypeToSize(GV->getType()->getElementType(), Target) << endl; } } diff --git a/llvm/lib/Target/Sparc/SparcInstrSelection.cpp b/llvm/lib/Target/Sparc/SparcInstrSelection.cpp index 2439b9877c9..c7b8ecb3512 100644 --- a/llvm/lib/Target/Sparc/SparcInstrSelection.cpp +++ b/llvm/lib/Target/Sparc/SparcInstrSelection.cpp @@ -771,7 +771,7 @@ SetOperandsForMemInstr(MachineInstr* minstr, newIdxVec->insert(newIdxVec->end(), idxVec->begin(), idxVec->end()); idxVec = newIdxVec; - assert(! ((PointerType*)ptrVal->getType())->getValueType()->isArrayType() + assert(!((PointerType*)ptrVal->getType())->getElementType()->isArrayType() && "GetElemPtr cannot be folded into array refs in selection"); } else @@ -782,7 +782,7 @@ SetOperandsForMemInstr(MachineInstr* minstr, // ptrVal = memInst->getPointerOperand(); - const Type* opType = cast<PointerType>(ptrVal->getType())->getValueType(); + const Type* opType = cast<PointerType>(ptrVal->getType())->getElementType(); if (opType->isArrayType()) { assert((memInst->getNumOperands() @@ -826,7 +826,7 @@ SetMemOperands_Internal(MachineInstr* minstr, const PointerType* ptrType = (PointerType*) ptrVal->getType(); - if (ptrType->getValueType()->isStructType()) + if (ptrType->getElementType()->isStructType()) { // the offset is always constant for structs isConstantOffset = true; @@ -839,7 +839,7 @@ SetMemOperands_Internal(MachineInstr* minstr, // It must be an array ref. Check if the offset is a constant, // and that the indexing has been lowered to a single offset. // - assert(ptrType->getValueType()->isArrayType()); + assert(ptrType->getElementType()->isArrayType()); assert(arrayOffsetVal != NULL && "Expect to be given Value* for array offsets"); @@ -1835,7 +1835,7 @@ GetInstructionsByRule(InstructionNode* subtreeRoot, cast<GetElementPtrInst>(subtreeRoot->getInstruction()); const PointerType* ptrType = cast<PointerType>(getElemInst->getPointerOperand()->getType()); - if (! ptrType->getValueType()->isArrayType()) + if (! ptrType->getElementType()->isArrayType()) {// we don't need a separate instr numInstr = 0; // don't forward operand! break; @@ -1853,7 +1853,7 @@ GetInstructionsByRule(InstructionNode* subtreeRoot, const PointerType* instrType = (const PointerType*) instr->getType(); assert(instrType->isPointerType()); int tsize = (int) - target.findOptimalStorageSize(instrType->getValueType()); + target.findOptimalStorageSize(instrType->getElementType()); assert(tsize != 0 && "Just to check when this can happen"); Method* method = instr->getParent()->getParent(); @@ -1881,9 +1881,9 @@ GetInstructionsByRule(InstructionNode* subtreeRoot, Instruction* instr = subtreeRoot->getInstruction(); const PointerType* instrType = (const PointerType*) instr->getType(); assert(instrType->isPointerType() && - instrType->getValueType()->isArrayType()); + instrType->getElementType()->isArrayType()); const Type* eltType = - ((ArrayType*) instrType->getValueType())->getElementType(); + ((ArrayType*) instrType->getElementType())->getElementType(); int tsize = (int) target.findOptimalStorageSize(eltType); assert(tsize != 0 && "Just to check when this can happen"); diff --git a/llvm/lib/Target/TargetData.cpp b/llvm/lib/Target/TargetData.cpp index b11ef0438ae..09bc6009dc8 100644 --- a/llvm/lib/Target/TargetData.cpp +++ b/llvm/lib/Target/TargetData.cpp @@ -151,7 +151,7 @@ unsigned TargetData::getIndexedOffset(const Type *ptrTy, unsigned Result = 0; // Get the type pointed to... - const Type *Ty = PtrTy->getValueType(); + const Type *Ty = PtrTy->getElementType(); for (unsigned CurIDX = 0; CurIDX < Idx.size(); ++CurIDX) { if (const StructType *STy = dyn_cast<const StructType>(Ty)) { |