mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Insertion of NoFolder functions to avoid ambiguous overload warnings or errors about whether to convert Idx to ArrayRef<Constant *> or ArrayRef<Value *> like ConstantFolder and TargetFolder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162090 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
63a99ff53a
commit
734fd27647
@ -181,6 +181,12 @@ public:
|
||||
ArrayRef<Constant *> IdxList) const {
|
||||
return ConstantExpr::getGetElementPtr(C, IdxList);
|
||||
}
|
||||
Constant *CreateGetElementPtr(Constant *C, Constant *Idx) const {
|
||||
// This form of the function only exists to avoid ambiguous overload
|
||||
// warnings about whether to convert Idx to ArrayRef<Constant *> or
|
||||
// ArrayRef<Value *>.
|
||||
return ConstantExpr::getGetElementPtr(C, Idx);
|
||||
}
|
||||
Instruction *CreateGetElementPtr(Constant *C,
|
||||
ArrayRef<Value *> IdxList) const {
|
||||
return GetElementPtrInst::Create(C, IdxList);
|
||||
@ -190,6 +196,12 @@ public:
|
||||
ArrayRef<Constant *> IdxList) const {
|
||||
return ConstantExpr::getInBoundsGetElementPtr(C, IdxList);
|
||||
}
|
||||
Constant *CreateInBoundsGetElementPtr(Constant *C, Constant *Idx) const {
|
||||
// This form of the function only exists to avoid ambiguous overload
|
||||
// warnings about whether to convert Idx to ArrayRef<Constant *> or
|
||||
// ArrayRef<Value *>.
|
||||
return ConstantExpr::getInBoundsGetElementPtr(C, Idx);
|
||||
}
|
||||
Instruction *CreateInBoundsGetElementPtr(Constant *C,
|
||||
ArrayRef<Value *> IdxList) const {
|
||||
return GetElementPtrInst::CreateInBounds(C, IdxList);
|
||||
|
Loading…
Reference in New Issue
Block a user