[llvm] r234096 - [opaque pointer type] More (constant, in this instance) GEP API migrations
David Blaikie
dblaikie at gmail.com
Sat Apr 4 08:12:14 PDT 2015
Author: dblaikie
Date: Sat Apr 4 10:12:13 2015
New Revision: 234096
URL: http://llvm.org/viewvc/llvm-project?rev=234096&view=rev
Log:
[opaque pointer type] More (constant, in this instance) GEP API migrations
Modified:
llvm/trunk/include/llvm/IR/IRBuilder.h
Modified: llvm/trunk/include/llvm/IR/IRBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/IRBuilder.h?rev=234096&r1=234095&r2=234096&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/IRBuilder.h (original)
+++ llvm/trunk/include/llvm/IR/IRBuilder.h Sat Apr 4 10:12:13 2015
@@ -1079,14 +1079,14 @@ public:
return Insert(GetElementPtrInst::Create(Ty, Ptr, Idx), Name);
}
- Value *CreateConstInBoundsGEP1_32(Value *Ptr, unsigned Idx0,
+ Value *CreateConstInBoundsGEP1_32(Type *Ty, Value *Ptr, unsigned Idx0,
const Twine &Name = "") {
Value *Idx = ConstantInt::get(Type::getInt32Ty(Context), Idx0);
if (Constant *PC = dyn_cast<Constant>(Ptr))
- return Insert(Folder.CreateInBoundsGetElementPtr(nullptr, PC, Idx), Name);
+ return Insert(Folder.CreateInBoundsGetElementPtr(Ty, PC, Idx), Name);
- return Insert(GetElementPtrInst::CreateInBounds(nullptr, Ptr, Idx), Name);
+ return Insert(GetElementPtrInst::CreateInBounds(Ty, Ptr, Idx), Name);
}
Value *CreateConstGEP2_32(Value *Ptr, unsigned Idx0, unsigned Idx1,
const Twine &Name = "") {
More information about the llvm-commits
mailing list