Skip to content

Commit 2685758

Browse files
committed
Revert "[RemoveDIs] Update DIBuilder C API with DbgRecord functions [2/2] (#85657)"
This reverts commit 2091c74. Builtbot failure: https://lab.llvm.org/buildbot/#/builders/16/builds/63080
1 parent ab8ace3 commit 2685758

File tree

4 files changed

+68
-137
lines changed

4 files changed

+68
-137
lines changed

llvm/docs/RemoveDIsDebugInfo.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,15 @@ New functions (all to be deprecated)
4040
LLVMIsNewDbgInfoFormat # Returns true if the module is in the new non-instruction mode.
4141
LLVMSetIsNewDbgInfoFormat # Convert to the requested debug info format.
4242
43-
LLVMDIBuilderInsertDeclareIntrinsicBefore # Insert a debug intrinsic (old debug info format).
43+
LLVMDIBuilderInsertDeclareIntrinsicBefore # Insert a debug intrinsic (old debug info format).
4444
LLVMDIBuilderInsertDeclareIntrinsicAtEnd # Same as above.
4545
LLVMDIBuilderInsertDbgValueIntrinsicBefore # Same as above.
4646
LLVMDIBuilderInsertDbgValueIntrinsicAtEnd # Same as above.
4747
48-
LLVMDIBuilderInsertDeclareRecordBefore # Insert a debug record (new debug info format).
48+
LLVMDIBuilderInsertDeclareRecordBefore # Insert a debug record (new debug info format).
4949
LLVMDIBuilderInsertDeclareRecordAtEnd # Same as above.
5050
LLVMDIBuilderInsertDbgValueRecordBefore # Same as above.
5151
LLVMDIBuilderInsertDbgValueRecordAtEnd # Same as above.
52-
53-
Existing functions (behaviour change)
54-
-------------------------------------
55-
LLVMDIBuilderInsertDeclareBefore # Insert a debug record (new debug info format) instead of a debug intrinsic (old debug info format).
56-
LLVMDIBuilderInsertDeclareAtEnd # Same as above.
57-
LLVMDIBuilderInsertDbgValueBefore # Same as above.
58-
LLVMDIBuilderInsertDbgValueAtEnd # Same as above.
5952
```
6053

6154
# Anything else?

llvm/include/llvm-c/DebugInfo.h

Lines changed: 20 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,26 +1249,21 @@ LLVMMetadataRef LLVMDIBuilderCreateTempGlobalVariableFwdDecl(
12491249
LLVMMetadataRef Decl, uint32_t AlignInBits);
12501250

12511251
/*
1252-
* Insert a new Declare DbgRecord before the given instruction.
1253-
*
1254-
* Only use in "new debug mode" (LLVMIsNewDbgInfoFormat() is true).
1255-
* Use LLVMSetIsNewDbgInfoFormat(LLVMBool) to convert between formats.
1256-
* See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes
1257-
*
1252+
* Insert a new llvm.dbg.declare intrinsic call before the given instruction.
12581253
* \param Builder The DIBuilder.
12591254
* \param Storage The storage of the variable to declare.
12601255
* \param VarInfo The variable's debug info descriptor.
12611256
* \param Expr A complex location expression for the variable.
12621257
* \param DebugLoc Debug info location.
12631258
* \param Instr Instruction acting as a location for the new intrinsic.
12641259
*/
1265-
LLVMDbgRecordRef
1260+
LLVMValueRef
12661261
LLVMDIBuilderInsertDeclareBefore(LLVMDIBuilderRef Builder, LLVMValueRef Storage,
12671262
LLVMMetadataRef VarInfo, LLVMMetadataRef Expr,
12681263
LLVMMetadataRef DebugLoc, LLVMValueRef Instr);
12691264
/**
12701265
* Soon to be deprecated.
1271-
* Only use in "old debug mode" (LLVMIsNewDbgInfoFormat() is false).
1266+
* Only use in "old debug mode" (LLVMIsNewDbgFormat() is false).
12721267
* See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes
12731268
*
12741269
* Insert a new llvm.dbg.declare intrinsic call before the given instruction.
@@ -1284,7 +1279,7 @@ LLVMValueRef LLVMDIBuilderInsertDeclareIntrinsicBefore(
12841279
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMValueRef Instr);
12851280
/**
12861281
* Soon to be deprecated.
1287-
* Only use in "new debug mode" (LLVMIsNewDbgInfoFormat() is true).
1282+
* Only use in "new debug mode" (LLVMIsNewDbgFormat() is true).
12881283
* See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes
12891284
*
12901285
* Insert a Declare DbgRecord before the given instruction.
@@ -1300,27 +1295,22 @@ LLVMDbgRecordRef LLVMDIBuilderInsertDeclareRecordBefore(
13001295
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMValueRef Instr);
13011296

13021297
/**
1303-
* Insert a new Declare DbgRecord at the end of the given basic block. If the
1304-
* basic block has a terminator instruction, the intrinsic is inserted before
1305-
* that terminator instruction.
1306-
*
1307-
* Only use in "new debug mode" (LLVMIsNewDbgInfoFormat() is true).
1308-
* Use LLVMSetIsNewDbgInfoFormat(LLVMBool) to convert between formats.
1309-
* See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes
1310-
*
1298+
* Insert a new llvm.dbg.declare intrinsic call at the end of the given basic
1299+
* block. If the basic block has a terminator instruction, the intrinsic is
1300+
* inserted before that terminator instruction.
13111301
* \param Builder The DIBuilder.
13121302
* \param Storage The storage of the variable to declare.
13131303
* \param VarInfo The variable's debug info descriptor.
13141304
* \param Expr A complex location expression for the variable.
13151305
* \param DebugLoc Debug info location.
13161306
* \param Block Basic block acting as a location for the new intrinsic.
13171307
*/
1318-
LLVMDbgRecordRef LLVMDIBuilderInsertDeclareAtEnd(
1308+
LLVMValueRef LLVMDIBuilderInsertDeclareAtEnd(
13191309
LLVMDIBuilderRef Builder, LLVMValueRef Storage, LLVMMetadataRef VarInfo,
13201310
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMBasicBlockRef Block);
13211311
/**
13221312
* Soon to be deprecated.
1323-
* Only use in "old debug mode" (LLVMIsNewDbgInfoFormat() is false).
1313+
* Only use in "old debug mode" (LLVMIsNewDbgFormat() is false).
13241314
* See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes
13251315
*
13261316
* Insert a new llvm.dbg.declare intrinsic call at the end of the given basic
@@ -1338,7 +1328,7 @@ LLVMValueRef LLVMDIBuilderInsertDeclareIntrinsicAtEnd(
13381328
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMBasicBlockRef Block);
13391329
/**
13401330
* Soon to be deprecated.
1341-
* Only use in "new debug mode" (LLVMIsNewDbgInfoFormat() is true).
1331+
* Only use in "new debug mode" (LLVMIsNewDbgFormat() is true).
13421332
* See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes
13431333
*
13441334
* Insert a Declare DbgRecord at the end of the given basic block. If the basic
@@ -1356,26 +1346,21 @@ LLVMDbgRecordRef LLVMDIBuilderInsertDeclareRecordAtEnd(
13561346
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMBasicBlockRef Block);
13571347

13581348
/**
1359-
* Insert a new Value DbgRecord before the given instruction.
1360-
*
1361-
* Only use in "new debug mode" (LLVMIsNewDbgInfoFormat() is true).
1362-
* Use LLVMSetIsNewDbgInfoFormat(LLVMBool) to convert between formats.
1363-
* See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes
1364-
*
1349+
* Insert a new llvm.dbg.value intrinsic call before the given instruction.
13651350
* \param Builder The DIBuilder.
13661351
* \param Val The value of the variable.
13671352
* \param VarInfo The variable's debug info descriptor.
13681353
* \param Expr A complex location expression for the variable.
13691354
* \param DebugLoc Debug info location.
13701355
* \param Instr Instruction acting as a location for the new intrinsic.
13711356
*/
1372-
LLVMDbgRecordRef
1357+
LLVMValueRef
13731358
LLVMDIBuilderInsertDbgValueBefore(LLVMDIBuilderRef Builder, LLVMValueRef Val,
13741359
LLVMMetadataRef VarInfo, LLVMMetadataRef Expr,
13751360
LLVMMetadataRef DebugLoc, LLVMValueRef Instr);
13761361
/**
13771362
* Soon to be deprecated.
1378-
* Only use in "old debug mode" (LLVMIsNewDbgInfoFormat() is false).
1363+
* Only use in "old debug mode" (Module::IsNewDbgInfoFormat is false).
13791364
* See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes
13801365
*
13811366
* Insert a new llvm.dbg.value intrinsic call before the given instruction.
@@ -1391,7 +1376,7 @@ LLVMValueRef LLVMDIBuilderInsertDbgValueIntrinsicBefore(
13911376
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMValueRef Instr);
13921377
/**
13931378
* Soon to be deprecated.
1394-
* Only use in "new debug mode" (LLVMIsNewDbgInfoFormat() is true).
1379+
* Only use in "new debug mode" (Module::IsNewDbgInfoFormat is true).
13951380
* See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes
13961381
*
13971382
* Insert a new llvm.dbg.value intrinsic call before the given instruction.
@@ -1407,27 +1392,22 @@ LLVMDbgRecordRef LLVMDIBuilderInsertDbgValueRecordBefore(
14071392
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMValueRef Instr);
14081393

14091394
/**
1410-
* Insert a new Value DbgRecord at the end of the given basic block. If the
1411-
* basic block has a terminator instruction, the intrinsic is inserted before
1412-
* that terminator instruction.
1413-
*
1414-
* Only use in "new debug mode" (LLVMIsNewDbgInfoFormat() is true).
1415-
* Use LLVMSetIsNewDbgInfoFormat(LLVMBool) to convert between formats.
1416-
* See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes
1417-
*
1395+
* Insert a new llvm.dbg.value intrinsic call at the end of the given basic
1396+
* block. If the basic block has a terminator instruction, the intrinsic is
1397+
* inserted before that terminator instruction.
14181398
* \param Builder The DIBuilder.
14191399
* \param Val The value of the variable.
14201400
* \param VarInfo The variable's debug info descriptor.
14211401
* \param Expr A complex location expression for the variable.
14221402
* \param DebugLoc Debug info location.
14231403
* \param Block Basic block acting as a location for the new intrinsic.
14241404
*/
1425-
LLVMDbgRecordRef LLVMDIBuilderInsertDbgValueAtEnd(
1405+
LLVMValueRef LLVMDIBuilderInsertDbgValueAtEnd(
14261406
LLVMDIBuilderRef Builder, LLVMValueRef Val, LLVMMetadataRef VarInfo,
14271407
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMBasicBlockRef Block);
14281408
/**
14291409
* Soon to be deprecated.
1430-
* Only use in "old debug mode" (LLVMIsNewDbgInfoFormat() is false).
1410+
* Only use in "old debug mode" (Module::IsNewDbgInfoFormat is false).
14311411
* See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes
14321412
*
14331413
* Insert a new llvm.dbg.value intrinsic call at the end of the given basic
@@ -1445,7 +1425,7 @@ LLVMValueRef LLVMDIBuilderInsertDbgValueIntrinsicAtEnd(
14451425
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMBasicBlockRef Block);
14461426
/**
14471427
* Soon to be deprecated.
1448-
* Only use in "new debug mode" (LLVMIsNewDbgInfoFormat() is true).
1428+
* Only use in "new debug mode" (Module::IsNewDbgInfoFormat is true).
14491429
* See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes
14501430
*
14511431
* Insert a new llvm.dbg.value intrinsic call at the end of the given basic

0 commit comments

Comments
 (0)