[PATCH] D32571: InferAddressSpaces: Search constant expressions for addrspacecasts
Justin Lebar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 28 12:31:37 PDT 2017
jlebar added inline comments.
================
Comment at: lib/Transforms/Scalar/InferAddressSpaces.cpp:843
+ for (const WeakVH &WVH : Postorder) {
+ assert(WVH && "value was unexpectedly deleted");
+ Value *V = WVH;
----------------
If we expect that the Value*s won't be deleted while in this vector, why are we using WeakVH at all? Are we trying to catch use-after-frees?
At least the choice to use WeakVH could use a comment somewhere, but if it's just fear of use-after-free's, is there some reason that this code is particularly dangerous as compared to other parts of LLVM, where we rely on asan/msan to catch this issue?
https://reviews.llvm.org/D32571
More information about the llvm-commits
mailing list