aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/Instructions.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-15 21:51:10 +0000
committerOwen Anderson <resistor@mac.com>2009-07-15 21:51:10 +0000
commita90b3dc2f1f70ab7102ec3f1fc57f199fd56d7cc (patch)
treeb54a5c3b507d9f5e051bdbdd587c6c6732ac837c /lib/VMCore/Instructions.cpp
parent7add5ff1d1257f6f09e66be42d459610f4693d68 (diff)
Move a few more convenience factory functions from Constant to LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75840 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Instructions.cpp')
-rw-r--r--lib/VMCore/Instructions.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp
index 6c3a36fe4f..74bf42bc92 100644
--- a/lib/VMCore/Instructions.cpp
+++ b/lib/VMCore/Instructions.cpp
@@ -1617,7 +1617,8 @@ BinaryOperator *BinaryOperator::CreateNot(LLVMContext &Context,
Constant *C;
if (const VectorType *PTy = dyn_cast<VectorType>(Op->getType())) {
C = Context.getAllOnesValue(PTy->getElementType());
- C = ConstantVector::get(std::vector<Constant*>(PTy->getNumElements(), C));
+ C = Context.getConstantVector(
+ std::vector<Constant*>(PTy->getNumElements(), C));
} else {
C = Context.getAllOnesValue(Op->getType());
}
@@ -1633,8 +1634,8 @@ BinaryOperator *BinaryOperator::CreateNot(LLVMContext &Context,
if (const VectorType *PTy = dyn_cast<VectorType>(Op->getType())) {
// Create a vector of all ones values.
Constant *Elt = Context.getAllOnesValue(PTy->getElementType());
- AllOnes =
- ConstantVector::get(std::vector<Constant*>(PTy->getNumElements(), Elt));
+ AllOnes = Context.getConstantVector(
+ std::vector<Constant*>(PTy->getNumElements(), Elt));
} else {
AllOnes = Context.getAllOnesValue(Op->getType());
}