[PATCH] D17923: Add getSetRef() to SetVector
don hinton via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 7 02:13:21 PST 2016
hintonda added a comment.
I agree that it isn't absolutely necessay, however, it is much more efficient. Relying on insert means you have create the object you want to insert first. In the case of DIImportEntitys, that means new'ing a new one.
We get around that by looking up the key first, which is possible for DenseSet, but not possible with SetVector, at least not unless you provide an escape hatch and return a reference to the underlying.
http://reviews.llvm.org/D17923
More information about the llvm-commits
mailing list