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. (#95535)
The DIBuilder C API was changed to deal with DbgRecord functions:
#84915#85657#92417 (comment)
As discussed by @nikic and @OCHyams:
#92417 (comment)
> For the intrinsic-inserting functions, do you think we should:
>
> a) mark as deprecated but otherwise leave them alone for now.
> b) mark as deprecated and change their behaviour so that they
> do nothing and return nullptr.
> c) outright delete them (it sounds like you're voting this one,
> but just wanted to double check).
This patch implements option (c).
Copy file name to clipboardExpand all lines: llvm/docs/ReleaseNotes.rst
+34-1Lines changed: 34 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -220,7 +220,40 @@ Changes to the C API
220
220
* ``LLVMConstICmp``
221
221
* ``LLVMConstFCmp``
222
222
223
-
* Added ``LLVMPositionBuilderBeforeDbgRecords`` and ``LLVMPositionBuilderBeforeInstrAndDbgRecords``. Same as ``LLVMPositionBuilder`` and ``LLVMPositionBuilderBefore`` except the insertion position is set to before the debug records that precede the target instruction. See the `debug info migration guide <https://llvm.org/docs/RemoveDIsDebugInfo.html>`_ for more info. ``LLVMPositionBuilder`` and ``LLVMPositionBuilderBefore`` are unchanged; they insert before the indicated instruction but after any attached debug records.
223
+
**Note:** The following changes are due to the removal of the debug info
224
+
intrinsics from LLVM and to the introduction of debug records into LLVM.
225
+
They are described in detail in the `debug info migration guide <https://llvm.org/docs/RemoveDIsDebugInfo.html>`_.
226
+
227
+
* Added the following functions to insert before the indicated instruction but
228
+
after any attached debug records.
229
+
230
+
* ``LLVMPositionBuilderBeforeDbgRecords``
231
+
* ``LLVMPositionBuilderBeforeInstrAndDbgRecords``
232
+
233
+
Same as ``LLVMPositionBuilder`` and ``LLVMPositionBuilderBefore`` except the
234
+
insertion position is set to before the debug records that precede the target
235
+
instruction. ``LLVMPositionBuilder`` and ``LLVMPositionBuilderBefore`` are
236
+
unchanged.
237
+
238
+
* Added the following functions to get/set the new non-instruction debug info format.
239
+
They will be deprecated in the future and they are just a transition aid.
240
+
241
+
* ``LLVMIsNewDbgInfoFormat``
242
+
* ``LLVMSetIsNewDbgInfoFormat``
243
+
244
+
* Added the following functions to insert a debug record (new debug info format).
245
+
246
+
* ``LLVMDIBuilderInsertDeclareRecordBefore``
247
+
* ``LLVMDIBuilderInsertDeclareRecordAtEnd``
248
+
* ``LLVMDIBuilderInsertDbgValueRecordBefore``
249
+
* ``LLVMDIBuilderInsertDbgValueRecordAtEnd``
250
+
251
+
* Deleted the following functions that inserted a debug intrinsic (old debug info format).
Copy file name to clipboardExpand all lines: llvm/docs/RemoveDIsDebugInfo.md
+15-18Lines changed: 15 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -140,34 +140,31 @@ Any tests downstream of the main LLVM repo that test the IR output of LLVM may b
140
140
Some new 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.
141
141
142
142
```
143
-
New functions (all to be deprecated)
144
-
------------------------------------
145
-
LLVMIsNewDbgInfoFormat # Returns true if the module is in the new non-instruction mode.
146
-
LLVMSetIsNewDbgInfoFormat # Convert to the requested debug info format.
147
-
148
-
LLVMDIBuilderInsertDeclareIntrinsicBefore # Insert a debug intrinsic (old debug info format).
149
-
LLVMDIBuilderInsertDeclareIntrinsicAtEnd # Same as above.
150
-
LLVMDIBuilderInsertDbgValueIntrinsicBefore # Same as above.
151
-
LLVMDIBuilderInsertDbgValueIntrinsicAtEnd # Same as above.
152
-
153
-
LLVMDIBuilderInsertDeclareRecordBefore # Insert a debug record (new debug info format).
154
-
LLVMDIBuilderInsertDeclareRecordAtEnd # Same as above.
155
-
LLVMDIBuilderInsertDbgValueRecordBefore # Same as above.
156
-
LLVMDIBuilderInsertDbgValueRecordAtEnd # Same as above.
157
-
158
-
Existing functions (behaviour change)
159
-
-------------------------------------
143
+
Deleted functions
144
+
-----------------
160
145
LLVMDIBuilderInsertDeclareBefore # Insert a debug record (new debug info format) instead of a debug intrinsic (old debug info format).
161
146
LLVMDIBuilderInsertDeclareAtEnd # Same as above.
162
147
LLVMDIBuilderInsertDbgValueBefore # Same as above.
163
148
LLVMDIBuilderInsertDbgValueAtEnd # Same as above.
164
149
150
+
New functions (to be deprecated)
151
+
--------------------------------
152
+
LLVMIsNewDbgInfoFormat # Returns true if the module is in the new non-instruction mode.
153
+
LLVMSetIsNewDbgInfoFormat # Convert to the requested debug info format.
154
+
165
155
New functions (no plans to deprecate)
166
-
----------------------------------
156
+
-------------------------------------
157
+
LLVMDIBuilderInsertDeclareRecordBefore # Insert a debug record (new debug info format).
158
+
LLVMDIBuilderInsertDeclareRecordAtEnd # Same as above. See info below.
159
+
LLVMDIBuilderInsertDbgValueRecordBefore # Same as above. See info below.
160
+
LLVMDIBuilderInsertDbgValueRecordAtEnd # Same as above. See info below.
161
+
167
162
LLVMPositionBuilderBeforeDbgRecords # See info below.
168
163
LLVMPositionBuilderBeforeInstrAndDbgRecords # See info below.
169
164
```
170
165
166
+
`LLVMDIBuilderInsertDeclareRecordBefore`, `LLVMDIBuilderInsertDeclareRecordAtEnd`, `LLVMDIBuilderInsertDbgValueRecordBefore` and `LLVMDIBuilderInsertDbgValueRecordAtEnd` are replacing the deleted `LLVMDIBuilderInsertDeclareBefore-style` functions.
167
+
171
168
`LLVMPositionBuilderBeforeDbgRecords` and `LLVMPositionBuilderBeforeInstrAndDbgRecords` behave the same as `LLVMPositionBuilder` and `LLVMPositionBuilderBefore` except the insertion position is set before the debug records that precede the target instruction. Note that this doesn't mean that debug intrinsics before the chosen instruction are skipped, only debug records (which unlike debug records are not themselves instructions).
172
169
173
170
If you don't know which function to call then follow this rule:
0 commit comments