You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[RemoveDIs] Update DIBuilder C API with DbgRecord functions [1/2] (#84915)
Follow on from #84739, which updates the DIBuilder class.
All the functions that have been added are temporary and will be
deprecated in the future. The intention is that they'll help downstream
projects adapt during the transition period.
```
New functions (all to be deprecated)
------------------------------------
LLVMIsNewDbgInfoFormat # Returns true if the module is in the new non-instruction mode.
LLVMSetIsNewDbgInfoFormat # Convert to the requested debug info format.
LLVMDIBuilderInsertDeclareIntrinsicBefore # Insert a debug intrinsic (old debug info format).
LLVMDIBuilderInsertDeclareIntrinsicAtEnd # Same as above.
LLVMDIBuilderInsertDbgValueIntrinsicBefore # Same as above.
LLVMDIBuilderInsertDbgValueIntrinsicAtEnd # Same as above.
LLVMDIBuilderInsertDeclareRecordBefore # Insert a debug record (new debug info format).
LLVMDIBuilderInsertDeclareRecordAtEnd # Same as above.
LLVMDIBuilderInsertDbgValueRecordBefore # Same as above.
LLVMDIBuilderInsertDbgValueRecordAtEnd # Same as above.
```
The existing `LLVMDIBuilderInsert...` functions call through to the
intrinsic versions (old debug info format) currently.
In the next patch, I'll swap them to call the debug records versions
(new debug info format). Downstream users of this API can query and
change the current format using the first two functions above, or can
instead opt to temporarily use intrinsics or records explicitly.
Copy file name to clipboardExpand all lines: llvm/docs/RemoveDIsDebugInfo.md
+21Lines changed: 21 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,27 @@ There are two significant changes to be aware of. Firstly, we're adding a single
30
30
31
31
The second matter is that if you transfer sequences of instructions from one place to another manually, i.e. repeatedly using `moveBefore` where you might have used `splice`, then you should instead use the method `moveBeforePreserving`. `moveBeforePreserving` will transfer debug info records with the instruction they're attached to. This is something that happens automatically today -- if you use `moveBefore` on every element of an instruction sequence, then debug intrinsics will be moved in the normal course of your code, but we lose this behaviour with non-instruction debug info.
32
32
33
+
# C-API changes
34
+
35
+
All the functions that have been added are temporary and will be deprecated in the future. The intention is that they'll help downstream projects adapt during the transition period.
36
+
37
+
```
38
+
New functions (all to be deprecated)
39
+
------------------------------------
40
+
LLVMIsNewDbgInfoFormat # Returns true if the module is in the new non-instruction mode.
41
+
LLVMSetIsNewDbgInfoFormat # Convert to the requested debug info format.
42
+
43
+
LLVMDIBuilderInsertDeclareIntrinsicBefore # Insert a debug intrinsic (old debug info format).
44
+
LLVMDIBuilderInsertDeclareIntrinsicAtEnd # Same as above.
45
+
LLVMDIBuilderInsertDbgValueIntrinsicBefore # Same as above.
46
+
LLVMDIBuilderInsertDbgValueIntrinsicAtEnd # Same as above.
47
+
48
+
LLVMDIBuilderInsertDeclareRecordBefore # Insert a debug record (new debug info format).
49
+
LLVMDIBuilderInsertDeclareRecordAtEnd # Same as above.
50
+
LLVMDIBuilderInsertDbgValueRecordBefore # Same as above.
51
+
LLVMDIBuilderInsertDbgValueRecordAtEnd # Same as above.
52
+
```
53
+
33
54
# Anything else?
34
55
35
56
Not really, but here's an "old vs new" comparison of how to do certain things and quickstart for how this "new" debug info is structured.
0 commit comments