[PATCH] D17337: __builtin_object_size problem with pointer as argument

George Burgess IV via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 25 10:23:49 PST 2016


george.burgess.iv accepted this revision.
george.burgess.iv added a comment.
This revision is now accepted and ready to land.

This LGTM. Thanks for the patch!


================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:1976
@@ -1962,3 +1975,3 @@
     }
 
     if (InvokeInst *II = dyn_cast<InvokeInst>(&MI)) {
----------------
`Users` is a vector of `WeakVH`, which is a class that gets updated automatically when a RAUW happens. If you want to verify this, try adding `assert(isa<IntrinsicInst>(Users[i]));` just above `replaceInstUsesWith`, and `assert(isa<ConstantInt>(Users[i]));` just below it. Neither assert fires on my build.

Either way, it's just a nit, so I'll leave the decision to move it up to you. :)


Repository:
  rL LLVM

http://reviews.llvm.org/D17337





More information about the llvm-commits mailing list