[llvm-commits] [llvm] r53926 - /llvm/trunk/include/llvm/Support/IRBuilder.h
Dan Gohman
gohman at apple.com
Tue Jul 22 11:25:26 PDT 2008
Author: djg
Date: Tue Jul 22 13:25:25 2008
New Revision: 53926
URL: http://llvm.org/viewvc/llvm-project?rev=53926&view=rev
Log:
IRBuilder support for insertvalue and extractvalue.
Modified:
llvm/trunk/include/llvm/Support/IRBuilder.h
Modified: llvm/trunk/include/llvm/Support/IRBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/IRBuilder.h?rev=53926&r1=53925&r2=53926&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/IRBuilder.h (original)
+++ llvm/trunk/include/llvm/Support/IRBuilder.h Tue Jul 22 13:25:25 2008
@@ -105,11 +105,6 @@
return Insert(ReturnInst::Create(retVals, N));
}
- GetResultInst *CreateGetResult(Value *V, unsigned Index,
- const char *Name = "") {
- return Insert(new GetResultInst(V, Index), Name);
- }
-
/// CreateBr - Create an unconditional 'br label X' instruction.
BranchInst *CreateBr(BasicBlock *Dest) {
return Insert(BranchInst::Create(Dest));
@@ -572,6 +567,37 @@
return ConstantExpr::getShuffleVector(V1C, V2C, MC);
return Insert(new ShuffleVectorInst(V1, V2, Mask), Name);
}
+
+ GetResultInst *CreateGetResult(Value *V, unsigned Index,
+ const char *Name = "") {
+ return Insert(new GetResultInst(V, Index), Name);
+ }
+
+ ExtractValueInst *CreateExtractValue(Value *Agg, unsigned Idx,
+ const char *Name = "") {
+ return Insert(ExtractValueInst::Create(Agg, Idx), Name);
+ }
+
+ template<typename InputIterator>
+ ExtractValueInst *CreateExtractValue(Value *Agg,
+ InputIterator IdxBegin,
+ InputIterator IdxEnd,
+ const char *Name = "") {
+ return Insert(ExtractValueInst::Create(Agg, IdxBegin, IdxEnd), Name);
+ }
+
+ InsertValueInst *CreateInsertValue(Value *Agg, Value *Val, unsigned Idx,
+ const char *Name = "") {
+ return Insert(InsertValueInst::Create(Agg, Val, Idx), Name);
+ }
+
+ template<typename InputIterator>
+ InsertValueInst *CreateInsertValue(Value *Agg, Value *Val,
+ InputIterator IdxBegin,
+ InputIterator IdxEnd,
+ const char *Name = "") {
+ return Insert(InsertValueInst::Create(Agg, Val, IdxBegin, IdxEnd), Name);
+ }
};
}
More information about the llvm-commits
mailing list