[llvm] [SandboxIR] Clean up tracking code with the help of tryTrack() (PR #102406)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 7 17:34:58 PDT 2024


================
@@ -256,6 +256,9 @@ class Value {
   template <typename ItTy, typename SBTy> friend class LLVMOpUserItToSBTy;
 
   Value(ClassID SubclassID, llvm::Value *Val, Context &Ctx);
+  /// Disable copies.
----------------
vporpo wrote:

When I tried to use `tryTrack()` in `PHINode::setIncomingValue()` I realized that `PHISetIncoming`'s constructor was taking a copy of the the instruction, rather than a reference, which would cause a crash when reverting. So I disabled copies here and I also reverted back to the original tracking code for `setIncomingValue()`. I will address those in a separate patch.

https://github.com/llvm/llvm-project/pull/102406


More information about the llvm-commits mailing list