[all-commits] [llvm/llvm-project] ae74e5: [WebAssembly] Print DEBUG_VALUE once for target in...

Heejin Ahn via All-commits all-commits at lists.llvm.org
Fri Dec 9 10:57:57 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ae74e59f701724712869e9c50de124c2fe6790c8
      https://github.com/llvm/llvm-project/commit/ae74e59f701724712869e9c50de124c2fe6790c8
  Author: Heejin Ahn <aheejin at gmail.com>
  Date:   2022-12-09 (Fri, 09 Dec 2022)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

  Log Message:
  -----------
  [WebAssembly] Print DEBUG_VALUE once for target indices

`DEBUG_VALUE` comments are printed before an instruction, so they are
not printed with `AddComment` method as other comments are, but printed
using `emitRawComment` method. But currently `emitDebugValueComment`
calls `emitRawComment` twice for target-index-based `DBG_VALUE`s: once
in the `switch`-`case`,
https://github.com/llvm/llvm-project/blob/d77ae7f2513504655e555cd326208598093d66e2/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp#L1192-L1193
and again at the end of the method:
https://github.com/llvm/llvm-project/blob/d77ae7f2513504655e555cd326208598093d66e2/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp#L1227-L1228

This makes them printed twice. I think this happened through multiple
commits modifying and refactoring this method.

Reviewed By: dschuff

Differential Revision: https://reviews.llvm.org/D139579




More information about the All-commits mailing list