mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
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
This commit is contained in:
@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user