mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-27 04:18:42 +00:00
[opaque pointer type] More (constant, in this instance) GEP API migrations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234096 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
1 parent
b8d7733666
commit
ffcb79bea1
1 file changed
+3
-3
@@ -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 = "") {
|
||||
|
||||
Reference in new issue
Block a user