[PATCH] D83896: [DebugInfo] Add replaceArg function for removing duplicates from DBG_VALUE_LIST expressions

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 21 14:57:16 PDT 2020


aprantl added a comment.

Could you please add a unit test for this?



================
Comment at: llvm/include/llvm/IR/DebugInfoMetadata.h:2600
 
+  /// Modify \p Expr by replacing each instance of `DW_OP_LLVM_arg, \p OldArg`
+  /// with `DW_OP_LLVM_arg, \p NewArg`, and then each `DW_OP_LLVM_arg, Arg`
----------------
I see the comment of the function above makes the same mistake: This is creating a copy of Expr, not modifying it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83896/new/

https://reviews.llvm.org/D83896





More information about the llvm-commits mailing list