[llvm] [Transforms] Debug values are not remapped when cloning. (PR #87747)

Carlos Alberto Enciso via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 9 04:38:33 PDT 2024


================
@@ -136,6 +137,8 @@ void DbgVariableIntrinsic::replaceVariableLocationOp(Value *OldValue,
   auto Locations = location_ops();
   auto OldIt = find(Locations, OldValue);
   if (OldIt == Locations.end()) {
+    if (AllowEmpty)
+      return;
----------------
CarlosAlbertoEnciso wrote:

Also, looking at the `DbgVariableRecord::replaceVariableLocationOp` the condition should be:
```
    if (AllowEmpty || DbgAssignAddrReplaced)
      return;
```


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


More information about the llvm-commits mailing list