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

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 15 18:02:40 PDT 2025


================
@@ -56,10 +56,19 @@ static bool printOp(const DWARFExpression::Operation *Op, raw_ostream &OS,
   assert(!Name.empty() && "DW_OP has no name!");
   OS << Name;
 
+  std::optional<unsigned> SubOpcode = Op->getSubCode();
+  if (SubOpcode) {
+    StringRef SubName = SubOperationEncodingString(Op->getCode(), *SubOpcode);
+    assert(!SubName.empty() && "DW_OP SubOp has no name!");
+    OS << " " << SubName;
----------------
arsenm wrote:

```suggestion
    OS << ' ' << SubName;
```

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


More information about the cfe-commits mailing list