mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
completely eliminate a temporary vector
llvm-svn: 34162
This commit is contained in:
parent
7223d491cb
commit
fd0d12756d
@ -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…
Reference in New Issue
Block a user