aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Instructions.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-29 22:17:13 +0000
committerOwen Anderson <resistor@mac.com>2009-07-29 22:17:13 +0000
commit6b6e2d9392782724c48110bcca4bee2c8fbbd7b9 (patch)
tree22a274838cf6c55205a8a3f0a80262b09b63b069 /lib/VMCore/Instructions.cpp
parentb468205b52e18639fc088d752667e4ead533ac18 (diff)
downloadexternal_llvm-6b6e2d9392782724c48110bcca4bee2c8fbbd7b9.zip
external_llvm-6b6e2d9392782724c48110bcca4bee2c8fbbd7b9.tar.gz
external_llvm-6b6e2d9392782724c48110bcca4bee2c8fbbd7b9.tar.bz2
Move types back to the 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77516 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Instructions.cpp')
-rw-r--r--lib/VMCore/Instructions.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp
index 0b24241..08b4396 100644
--- a/lib/VMCore/Instructions.cpp
+++ b/lib/VMCore/Instructions.cpp
@@ -716,7 +716,7 @@ static Value *getAISize(LLVMContext &Context, Value *Amt) {
AllocationInst::AllocationInst(const Type *Ty, Value *ArraySize, unsigned iTy,
unsigned Align, const Twine &Name,
Instruction *InsertBefore)
- : UnaryInstruction(Ty->getContext().getPointerTypeUnqual(Ty), iTy,
+ : UnaryInstruction(PointerType::getUnqual(Ty), iTy,
getAISize(Ty->getContext(), ArraySize), InsertBefore) {
setAlignment(Align);
assert(Ty != Type::VoidTy && "Cannot allocate void!");
@@ -726,7 +726,7 @@ AllocationInst::AllocationInst(const Type *Ty, Value *ArraySize, unsigned iTy,
AllocationInst::AllocationInst(const Type *Ty, Value *ArraySize, unsigned iTy,
unsigned Align, const Twine &Name,
BasicBlock *InsertAtEnd)
- : UnaryInstruction(Ty->getContext().getPointerTypeUnqual(Ty), iTy,
+ : UnaryInstruction(PointerType::getUnqual(Ty), iTy,
getAISize(Ty->getContext(), ArraySize), InsertAtEnd) {
setAlignment(Align);
assert(Ty != Type::VoidTy && "Cannot allocate void!");
@@ -1046,7 +1046,7 @@ GetElementPtrInst::GetElementPtrInst(const GetElementPtrInst &GEPI)
GetElementPtrInst::GetElementPtrInst(Value *Ptr, Value *Idx,
const Twine &Name, Instruction *InBe)
- : Instruction(Ptr->getType()->getContext().getPointerType(
+ : Instruction(PointerType::get(
checkType(getIndexedType(Ptr->getType(),Idx)), retrieveAddrSpace(Ptr)),
GetElementPtr,
OperandTraits<GetElementPtrInst>::op_end(this) - 2,
@@ -1056,7 +1056,7 @@ GetElementPtrInst::GetElementPtrInst(Value *Ptr, Value *Idx,
GetElementPtrInst::GetElementPtrInst(Value *Ptr, Value *Idx,
const Twine &Name, BasicBlock *IAE)
- : Instruction(Ptr->getType()->getContext().getPointerType(
+ : Instruction(PointerType::get(
checkType(getIndexedType(Ptr->getType(),Idx)),
retrieveAddrSpace(Ptr)),
GetElementPtr,
@@ -1270,8 +1270,7 @@ ShuffleVectorInst::ShuffleVectorInst(const ShuffleVectorInst &SV)
ShuffleVectorInst::ShuffleVectorInst(Value *V1, Value *V2, Value *Mask,
const Twine &Name,
Instruction *InsertBefore)
-: Instruction(V1->getType()->getContext().getVectorType(
- cast<VectorType>(V1->getType())->getElementType(),
+: Instruction(VectorType::get(cast<VectorType>(V1->getType())->getElementType(),
cast<VectorType>(Mask->getType())->getNumElements()),
ShuffleVector,
OperandTraits<ShuffleVectorInst>::op_begin(this),