Update for LLVM API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77368 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index ab0f9e9..3a37f2d 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -410,7 +410,7 @@
Mask.push_back(llvm::ConstantInt::get(llvm::Type::Int32Ty, InIdx));
}
- llvm::Value *MaskV = VMContext.getConstantVector(&Mask[0], Mask.size());
+ llvm::Value *MaskV = llvm::ConstantVector::get(&Mask[0], Mask.size());
Vec = Builder.CreateShuffleVector(Vec,
VMContext.getUndef(Vec->getType()),
MaskV, "tmp");
@@ -615,7 +615,7 @@
Mask[InIdx] = llvm::ConstantInt::get(llvm::Type::Int32Ty, i);
}
- llvm::Value *MaskV = VMContext.getConstantVector(&Mask[0], Mask.size());
+ llvm::Value *MaskV = llvm::ConstantVector::get(&Mask[0], Mask.size());
Vec = Builder.CreateShuffleVector(SrcVal,
VMContext.getUndef(Vec->getType()),
MaskV, "tmp");
@@ -631,7 +631,7 @@
ExtMask.push_back(llvm::ConstantInt::get(llvm::Type::Int32Ty, i));
for (; i != NumDstElts; ++i)
ExtMask.push_back(VMContext.getUndef(llvm::Type::Int32Ty));
- llvm::Value *ExtMaskV = VMContext.getConstantVector(&ExtMask[0],
+ llvm::Value *ExtMaskV = llvm::ConstantVector::get(&ExtMask[0],
ExtMask.size());
llvm::Value *ExtSrcVal =
Builder.CreateShuffleVector(SrcVal,
@@ -647,7 +647,7 @@
unsigned Idx = getAccessedFieldNo(i, Elts);
Mask[Idx] = llvm::ConstantInt::get(llvm::Type::Int32Ty, i+NumDstElts);
}
- llvm::Value *MaskV = VMContext.getConstantVector(&Mask[0], Mask.size());
+ llvm::Value *MaskV = llvm::ConstantVector::get(&Mask[0], Mask.size());
Vec = Builder.CreateShuffleVector(Vec, ExtSrcVal, MaskV, "tmp");
}
else {
@@ -932,7 +932,7 @@
for (unsigned i = 0, e = Elts.size(); i != e; ++i)
CElts.push_back(llvm::ConstantInt::get(llvm::Type::Int32Ty, Elts[i]));
- return VMContext.getConstantVector(&CElts[0], CElts.size());
+ return llvm::ConstantVector::get(&CElts[0], CElts.size());
}
LValue CodeGenFunction::
@@ -972,7 +972,7 @@
else
CElts.push_back(BaseElts->getOperand(Indices[i]));
}
- llvm::Constant *CV = VMContext.getConstantVector(&CElts[0], CElts.size());
+ llvm::Constant *CV = llvm::ConstantVector::get(&CElts[0], CElts.size());
return LValue::MakeExtVectorElt(Base.getExtVectorAddr(), CV,
Base.getQualifiers());
}
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index 9976677..55361f8 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/lib/CodeGen/CGExprConstant.cpp
@@ -646,7 +646,7 @@
for (; i < NumElements; ++i)
Elts.push_back(VMContext.getNullValue(ElemTy));
- return VMContext.getConstantVector(VType, Elts);
+ return llvm::ConstantVector::get(VType, Elts);
}
llvm::Constant *VisitImplicitValueInitExpr(ImplicitValueInitExpr* E) {
@@ -901,7 +901,7 @@
else
Inits.push_back(llvm::ConstantFP::get(VMContext, Elt.getFloat()));
}
- return VMContext.getConstantVector(&Inits[0], Inits.size());
+ return llvm::ConstantVector::get(&Inits[0], Inits.size());
}
}
}
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp
index 141d393..cbca7aa 100644
--- a/lib/CodeGen/CGExprScalar.cpp
+++ b/lib/CodeGen/CGExprScalar.cpp
@@ -476,7 +476,7 @@
for (unsigned i = 0; i < NumElements; i++)
Args.push_back(llvm::ConstantInt::get(llvm::Type::Int32Ty, 0));
- llvm::Constant *Mask = VMContext.getConstantVector(&Args[0], NumElements);
+ llvm::Constant *Mask = llvm::ConstantVector::get(&Args[0], NumElements);
llvm::Value *Yay = Builder.CreateShuffleVector(UnV, UnV, Mask, "splat");
return Yay;
}
@@ -555,7 +555,7 @@
}
Value* V1 = CGF.EmitScalarExpr(E->getExpr(0));
Value* V2 = CGF.EmitScalarExpr(E->getExpr(1));
- Value* SV = VMContext.getConstantVector(indices.begin(), indices.size());
+ Value* SV = llvm::ConstantVector::get(indices.begin(), indices.size());
return Builder.CreateShuffleVector(V1, V2, SV, "shuffle");
}
@@ -1599,7 +1599,7 @@
const char *Name = va_arg(va, const char *);
va_end(va);
- llvm::Constant *Mask = VMContext.getConstantVector(&Args[0], NumElements);
+ llvm::Constant *Mask = llvm::ConstantVector::get(&Args[0], NumElements);
return Builder.CreateShuffleVector(V1, V2, Mask, Name);
}