[llvm] [SandboxIR] Add more Instruction member functions (PR #98588)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 15 13:55:21 PDT 2024
================
@@ -623,6 +670,12 @@ class Context {
DenseMap<llvm::Value *, std::unique_ptr<sandboxir::Value>>
LLVMValueToValueMap;
+ /// Remove \p V from the maps and returns the unique_ptr.
+ std::unique_ptr<Value> detachLLVMValue(llvm::Value *V);
----------------
vporpo wrote:
I don't feel strongly either way, but these `detach()` functions are meant to be used either for detaching or for just deleting the value. I think it's currently only used for deleting them, so the value is discarded. There is no real harm in discarding the returned value as far as I can tell.
https://github.com/llvm/llvm-project/pull/98588
More information about the llvm-commits
mailing list