diff options
author | Tom Tromey <tromey@adacore.com> | 2025-10-03 07:36:17 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-10-03 14:36:17 +0100 |
commit | 296fddc89e23b33055ff3f7ccb55de6c47dac757 (patch) | |
tree | bbff89a6bfc34a2f8e2ebc751d622a02c9c695b4 /llvm/lib/IR/DebugInfoMetadata.cpp | |
parent | ffc503edd0a2d07121232fe204e480fc29631a90 (diff) | |
download | llvm-296fddc89e23b33055ff3f7ccb55de6c47dac757.zip llvm-296fddc89e23b33055ff3f7ccb55de6c47dac757.tar.gz llvm-296fddc89e23b33055ff3f7ccb55de6c47dac757.tar.bz2 |
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).
Diffstat (limited to 'llvm/lib/IR/DebugInfoMetadata.cpp')
-rw-r--r-- | llvm/lib/IR/DebugInfoMetadata.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/IR/DebugInfoMetadata.cpp b/llvm/lib/IR/DebugInfoMetadata.cpp index 1ededb9e7..77d044b 100644 --- a/llvm/lib/IR/DebugInfoMetadata.cpp +++ b/llvm/lib/IR/DebugInfoMetadata.cpp @@ -1768,6 +1768,7 @@ bool DIExpression::isValid() const { case dwarf::DW_OP_bregx: case dwarf::DW_OP_push_object_address: case dwarf::DW_OP_over: + case dwarf::DW_OP_rot: case dwarf::DW_OP_consts: case dwarf::DW_OP_eq: case dwarf::DW_OP_ne: @@ -1775,6 +1776,8 @@ bool DIExpression::isValid() const { case dwarf::DW_OP_ge: case dwarf::DW_OP_lt: case dwarf::DW_OP_le: + case dwarf::DW_OP_neg: + case dwarf::DW_OP_abs: break; } } |