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.
llvm#84915llvm#85657llvm#92417 (comment)
As discussed by @nikic and @OCHyams:
llvm#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
+37-1Lines changed: 37 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -220,7 +220,43 @@ 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
+
* Added the following functions to insert before the indicated instruction but
224
+
after any attached debug records.
225
+
226
+
* ``LLVMPositionBuilderBeforeDbgRecords``
227
+
* ``LLVMPositionBuilderBeforeInstrAndDbgRecords``
228
+
229
+
Same as ``LLVMPositionBuilder`` and ``LLVMPositionBuilderBefore`` except the
230
+
insertion position is set to before the debug records that precede the target
231
+
instruction. ``LLVMPositionBuilder`` and ``LLVMPositionBuilderBefore`` are
232
+
unchanged.
233
+
234
+
See the `debug info migration guide <https://llvm.org/docs/RemoveDIsDebugInfo.html>`_ for more info.
235
+
236
+
* Added the following functions to get/set the new non-instruction debug info format.
237
+
238
+
* ``LLVMIsNewDbgInfoFormat``
239
+
* ``LLVMSetIsNewDbgInfoFormat``
240
+
241
+
* Added the following functions (no plans to deprecate) to insert a debug record
242
+
(new debug info format).
243
+
244
+
* ``LLVMDIBuilderInsertDeclareRecordBefore``
245
+
* ``LLVMDIBuilderInsertDeclareRecordAtEnd``
246
+
* ``LLVMDIBuilderInsertDbgValueRecordBefore``
247
+
* ``LLVMDIBuilderInsertDbgValueRecordAtEnd``
248
+
249
+
* Deleted the following functions that inserted a debug intrinsic (old debug info format)
Copy file name to clipboardExpand all lines: llvm/docs/RemoveDIsDebugInfo.md
+17-15Lines changed: 17 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -140,34 +140,36 @@ 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.
143
+
Deleted functions
144
+
-----------------
145
+
LLVMDIBuilderInsertDeclareBefore # Insert a debug record (new debug info format) instead of a debug intrinsic (old debug info format).
146
+
LLVMDIBuilderInsertDeclareAtEnd # Same as above.
147
+
LLVMDIBuilderInsertDbgValueBefore # Same as above.
148
+
LLVMDIBuilderInsertDbgValueAtEnd # Same as above.
147
149
148
150
LLVMDIBuilderInsertDeclareIntrinsicBefore # Insert a debug intrinsic (old debug info format).
149
151
LLVMDIBuilderInsertDeclareIntrinsicAtEnd # Same as above.
150
152
LLVMDIBuilderInsertDbgValueIntrinsicBefore # Same as above.
151
153
LLVMDIBuilderInsertDbgValueIntrinsicAtEnd # Same as above.
152
154
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.
155
+
New functions (to be deprecated)
156
+
--------------------------------
157
+
LLVMIsNewDbgInfoFormat # Returns true if the module is in the new non-instruction mode.
158
+
LLVMSetIsNewDbgInfoFormat # Convert to the requested debug info format.
157
159
158
-
Existing functions (behaviour change)
160
+
New functions (no plans to deprecate)
159
161
-------------------------------------
160
-
LLVMDIBuilderInsertDeclareBefore # Insert a debug record (new debug info format) instead of a debug intrinsic (old debug info format).
161
-
LLVMDIBuilderInsertDeclareAtEnd # Same as above.
162
-
LLVMDIBuilderInsertDbgValueBefore # Same as above.
163
-
LLVMDIBuilderInsertDbgValueAtEnd # Same as above.
162
+
LLVMDIBuilderInsertDeclareRecordBefore # Insert a debug record (new debug info format).
163
+
LLVMDIBuilderInsertDeclareRecordAtEnd # Same as above. See info below.
164
+
LLVMDIBuilderInsertDbgValueRecordBefore # Same as above. See info below.
165
+
LLVMDIBuilderInsertDbgValueRecordAtEnd # Same as above. See info below.
164
166
165
-
New functions (no plans to deprecate)
166
-
----------------------------------
167
167
LLVMPositionBuilderBeforeDbgRecords # See info below.
168
168
LLVMPositionBuilderBeforeInstrAndDbgRecords # See info below.
169
169
```
170
170
171
+
`LLVMDIBuilderInsertDeclareRecordBefore`, `LLVMDIBuilderInsertDeclareRecordAtEnd`, `LLVMDIBuilderInsertDbgValueRecordBefore` and `LLVMDIBuilderInsertDbgValueRecordAtEnd` are replacing the deleted `LLVMDIBuilderInsertDeclareBefore-style` functions.
172
+
171
173
`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
174
173
175
If you don't know which function to call then follow this rule:
0 commit comments