mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-01 10:02:42 +00:00
completely eliminate a temporary vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34162 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7f6b9d2f1a
commit
309f87e34a
@ -133,8 +133,8 @@ static Constant *SymbolicallyEvaluateGEP(Constant** Ops, unsigned NumOps,
|
||||
break;
|
||||
}
|
||||
if (isFoldableGEP) {
|
||||
std::vector<Value*> NewOps(Ops+1, Ops+NumOps);
|
||||
uint64_t Offset = TD->getIndexedOffset(Ptr->getType(), NewOps);
|
||||
uint64_t Offset = TD->getIndexedOffset(Ptr->getType(),
|
||||
(Value**)Ops+1, NumOps-1);
|
||||
Constant *C = ConstantInt::get(TD->getIntPtrType(), Offset);
|
||||
return ConstantExpr::getIntToPtr(C, ResultTy);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user