diff options
author | Dan Gohman <gohman@apple.com> | 2009-08-25 22:29:08 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-08-25 22:29:08 +0000 |
commit | 30f809196362b497eef743ef60acd0724e97654b (patch) | |
tree | e8116041dd853a17abe553fb9aeac2de96aeb7a8 /lib/VMCore/Instructions.cpp | |
parent | d8110fb7264993f30133c532cd074313bead0afa (diff) |
Use covariant return types for Instruction::clone, and eliminate
the forms of ExtractElementInst and InsertElementInst that are
equivalent to clone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80041 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Instructions.cpp')
-rw-r--r-- | lib/VMCore/Instructions.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index 12a4045a14..122569ddae 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -2933,73 +2933,73 @@ StoreInst *StoreInst::clone(LLVMContext&) const { return New; } -CastInst *TruncInst::clone(LLVMContext&) const { +TruncInst *TruncInst::clone(LLVMContext&) const { TruncInst *New = new TruncInst(getOperand(0), getType()); New->SubclassOptionalData = SubclassOptionalData; return New; } -CastInst *ZExtInst::clone(LLVMContext&) const { +ZExtInst *ZExtInst::clone(LLVMContext&) const { ZExtInst *New = new ZExtInst(getOperand(0), getType()); New->SubclassOptionalData = SubclassOptionalData; return New; } -CastInst *SExtInst::clone(LLVMContext&) const { +SExtInst *SExtInst::clone(LLVMContext&) const { SExtInst *New = new SExtInst(getOperand(0), getType()); New->SubclassOptionalData = SubclassOptionalData; return New; } -CastInst *FPTruncInst::clone(LLVMContext&) const { +FPTruncInst *FPTruncInst::clone(LLVMContext&) const { FPTruncInst *New = new FPTruncInst(getOperand(0), getType()); New->SubclassOptionalData = SubclassOptionalData; return New; } -CastInst *FPExtInst::clone(LLVMContext&) const { +FPExtInst *FPExtInst::clone(LLVMContext&) const { FPExtInst *New = new FPExtInst(getOperand(0), getType()); New->SubclassOptionalData = SubclassOptionalData; return New; } -CastInst *UIToFPInst::clone(LLVMContext&) const { +UIToFPInst *UIToFPInst::clone(LLVMContext&) const { UIToFPInst *New = new UIToFPInst(getOperand(0), getType()); New->SubclassOptionalData = SubclassOptionalData; return New; } -CastInst *SIToFPInst::clone(LLVMContext&) const { +SIToFPInst *SIToFPInst::clone(LLVMContext&) const { SIToFPInst *New = new SIToFPInst(getOperand(0), getType()); New->SubclassOptionalData = SubclassOptionalData; return New; } -CastInst *FPToUIInst::clone(LLVMContext&) const { +FPToUIInst *FPToUIInst::clone(LLVMContext&) const { FPToUIInst *New = new FPToUIInst(getOperand(0), getType()); New->SubclassOptionalData = SubclassOptionalData; return New; } -CastInst *FPToSIInst::clone(LLVMContext&) const { +FPToSIInst *FPToSIInst::clone(LLVMContext&) const { FPToSIInst *New = new FPToSIInst(getOperand(0), getType()); New->SubclassOptionalData = SubclassOptionalData; return New; } -CastInst *PtrToIntInst::clone(LLVMContext&) const { +PtrToIntInst *PtrToIntInst::clone(LLVMContext&) const { PtrToIntInst *New = new PtrToIntInst(getOperand(0), getType()); New->SubclassOptionalData = SubclassOptionalData; return New; } -CastInst *IntToPtrInst::clone(LLVMContext&) const { +IntToPtrInst *IntToPtrInst::clone(LLVMContext&) const { IntToPtrInst *New = new IntToPtrInst(getOperand(0), getType()); New->SubclassOptionalData = SubclassOptionalData; return New; } -CastInst *BitCastInst::clone(LLVMContext&) const { +BitCastInst *BitCastInst::clone(LLVMContext&) const { BitCastInst *New = new BitCastInst(getOperand(0), getType()); New->SubclassOptionalData = SubclassOptionalData; return New; |