[clang] [llvm] [Dwarf] Support heterogeneous DW_{OP,AT}s needed for AMDGPU CFI (PR #153883)

Scott Linder via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 15 08:24:26 PDT 2025


================
@@ -141,3 +141,9 @@ TEST_F(DWARFExpressionCompactPrinterTest, Test_OP_nop_OP_reg) {
 TEST_F(DWARFExpressionCompactPrinterTest, Test_OP_LLVM_nop_OP_reg) {
   TestExprPrinter({DW_OP_LLVM_user, DW_OP_LLVM_nop, DW_OP_reg0}, "R0");
 }
+
+TEST_F(DWARFExpressionCompactPrinterTest, Test_OP_LLVM_user_unknown_subop) {
+  TestExprPrinter({DW_OP_LLVM_user, DW_OP_LLVM_form_aspace_address},
+                  "<unknown op DW_OP_LLVM_user (233) subop "
+                  "DW_OP_LLVM_form_aspace_address (2)>");
----------------
slinder1 wrote:

It is a subop, the message is trying to say "unknown op+subop (DW_OP_LLVM_user+DW_OP_LLVM_form_aspace_address)"

It is only "unknown" to the DWARFExpressionCompactPrinter, not to the codebase in general (we have a name for it at least, so it can't be that unknown)

I just extended the existing diagnostic message here, but maybe it could be improved?

https://github.com/llvm/llvm-project/pull/153883


More information about the llvm-commits mailing list