llvm-project/llvm/test/Other/print-mi-addrs.ll
Peter Collingbourne 0ebf7b473a
IR, CodeGen: Add command line flags for dumping instruction addresses and debug locations.
As previously discussed [1], it is sometimes useful to be able to see
instruction addresses and debug locations as part of IR dumps. The
same applies to MachineInstrs which already dump debug locations but
not addresses. Therefore add some flags that can be used to enable
dumping of this information.

[1] https://discourse.llvm.org/t/small-improvement-to-llvm-debugging-experience/79914

Reviewers: rnk

Reviewed By: rnk

Pull Request: https://github.com/llvm/llvm-project/pull/127944
2025-02-27 15:45:55 -08:00

12 lines
228 B
LLVM

; RUN: llc -print-after=slotindexes -print-mi-addrs < %s 2>&1 | FileCheck %s
; REQUIRES: default_triple
; CHECK: IR Dump {{.*}}
; CHECK: # Machine code for function foo{{.*}}
define void @foo() {
; CHECK: ; 0x
ret void
}