[cfe-commits] r77368 - in /cfe/trunk/lib/CodeGen: CGExpr.cpp CGExprConstant.cpp CGExprScalar.cpp
Owen Anderson
resistor at mac.com
Tue Jul 28 14:22:35 PDT 2009
Author: resistor
Date: Tue Jul 28 16:22:35 2009
New Revision: 77368
URL: http://llvm.org/viewvc/llvm-project?rev=77368&view=rev
Log:
Update for LLVM API change.
Modified:
cfe/trunk/lib/CodeGen/CGExpr.cpp
cfe/trunk/lib/CodeGen/CGExprConstant.cpp
cfe/trunk/lib/CodeGen/CGExprScalar.cpp
Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExpr.cpp?rev=77368&r1=77367&r2=77368&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Tue Jul 28 16:22:35 2009
@@ -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());
}
Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprConstant.cpp?rev=77368&r1=77367&r2=77368&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprConstant.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprConstant.cpp Tue Jul 28 16:22:35 2009
@@ -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());
}
}
}
Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprScalar.cpp?rev=77368&r1=77367&r2=77368&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Tue Jul 28 16:22:35 2009
@@ -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);
}
More information about the cfe-commits
mailing list