llvm-project/llvm/test/Bitcode/DW_OP_rot_neg_abs.ll
Tom Tromey 296fddc89e
Allow DW_OP_rot, DW_OP_neg, and DW_OP_abs in DIExpression (#160757)
The Ada front end can emit somewhat complicated DWARF expressions for
the offset of a field. While working in this area I found that I needed
DW_OP_rot (to implement a branch-free computation -- it looked more
difficult to add support for branching); and DW_OP_neg and DW_OP_abs
(just basic functionality).
2025-10-03 14:36:17 +01:00

11 lines
552 B
LLVM

;; This test checks the validity of DWARF operators DW_OP_rot, DW_OP_neg, and DW_OP_abs.
; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s
; CHECK: !DIExpression(DW_OP_push_object_address, DW_OP_lit0, DW_OP_lit0, DW_OP_neg, DW_OP_abs, DW_OP_rot, DW_OP_rot, DW_OP_rot, DW_OP_plus, DW_OP_plus)
; ModuleID = 'DW_OP_rot_neg_abs.adb'
source_filename = "/dir/DW_OP_rot_neg_abs.ll"
!named = !{!DIExpression(DW_OP_push_object_address, DW_OP_lit0, DW_OP_lit0, DW_OP_neg, DW_OP_abs, DW_OP_rot, DW_OP_rot, DW_OP_rot, DW_OP_plus, DW_OP_plus)}