forked from OSchip/llvm-project
Switch from std::vector to ArrayRef. Speedup FoldBitCast by 5x.
llvm-svn: 176602
This commit is contained in:
parent
b41977f852
commit
883304333d
|
@ -1416,9 +1416,9 @@ static inline Constant *getFoldedCast(
|
|||
|
||||
LLVMContextImpl *pImpl = Ty->getContext().pImpl;
|
||||
|
||||
// Look up the constant in the table first to ensure uniqueness
|
||||
std::vector<Constant*> argVec(1, C);
|
||||
ExprMapKeyType Key(opc, argVec);
|
||||
// Look up the constant in the table first to ensure uniqueness.
|
||||
ArrayRef<Constant*> Ops(&C, 1);
|
||||
ExprMapKeyType Key(opc, Ops);
|
||||
|
||||
return pImpl->ExprConstants.getOrCreate(Ty, Key);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue