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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 3 18:27:02 PDT 2025


================
@@ -70,10 +79,8 @@ static bool printOp(const DWARFExpression::Operation *Op, raw_ostream &OS,
     unsigned Signed = Size & DWARFExpression::Operation::SignBit;
 
     if (Size == DWARFExpression::Operation::SizeSubOpLEB) {
-      StringRef SubName =
-          SubOperationEncodingString(Op->getCode(), Op->getRawOperand(Operand));
-      assert(!SubName.empty() && "DW_OP SubOp has no name!");
-      OS << " " << SubName;
+      assert(Operand == 0);
+      assert(SubOpcode);
----------------
arsenm wrote:

```suggestion
      assert(Operand == 0 && SubOpcode);
```
Assert message? 

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


More information about the llvm-commits mailing list