[PATCH] IR: Move the complex address expression field out of DIVariable and into an extra argument of the dbg.declare/dbg.value intrinsics.

Adrian Prantl aprantl at apple.com
Thu Aug 21 17:18:16 PDT 2014


If we also bump the metadata version number with this patch, the debug info will be stripped. Originally I thought that AsmParser would still throw an error because the intrinsics are missing an argument, but this is not the case, I just verified that. So this is good, that removes the autoupgrade requirement!

My rationale for DW_TAG_user_lo is that this way we can guarantee that all DIDescriptor tags (except line table entries) are within the range [DW_TAG_array_type | LLVM_DebugVersion .. DW_TAG_user_hi|LLVM_DebugVersion].

My current suggestion is to use the end of the DW_TAG_user range for this purpose:
```
    enum ComplexAddrKind {
      OpFirst = dwarf::DW_TAG_hi_user - dwarf::DW_OP_hi_user,
      OpPlus  = OpFirst + dwarf::DW_OP_plus,
      OpDeref = OpFirst + dwarf::DW_OP_deref,
      OpPiece = OpFirst + dwarf::DW_OP_piece,
      OpLast = OpPiece
    };

```

http://reviews.llvm.org/D4919






More information about the llvm-commits mailing list