Skip to content

Commit 25c66b1

Browse files
committed
Remove C-API changes
1 parent edecd14 commit 25c66b1

File tree

7 files changed

+47
-217
lines changed

7 files changed

+47
-217
lines changed

llvm/docs/RemoveDIsDebugInfo.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,6 @@ There are two significant changes to be aware of. Firstly, we're adding a single
3030

3131
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.
3232

33-
# C-API changes
34-
35-
```
36-
LLVMDIBuilderInsertDeclareBefore # Changed - Inserts a non-instruction debug record.
37-
LLVMDIBuilderInsertDeclareAtEnd # Changed - Inserts a non-instruction debug record.
38-
LLVMDIBuilderInsertDbgValueBefore # Changed - Inserts a non-instruction debug record.
39-
LLVMDIBuilderInsertDbgValueAtEnd # Changed - Inserts a non-instruction debug record.
40-
41-
LLVMIsNewDbgInfoFormat # New - Returns true if the module is in the new non-instruction mode. Will be deprecated in future.
42-
LLVMDIBuilderInsertDeclareIntrinsicBefore # New - Old behaviour of the changed functions above, i.e., insert a dbg intrinsic call. Will be deprecated in future.
43-
LLVMDIBuilderInsertDeclareIntrinsicAtEnd # New - Old behaviour of the changed functions above, i.e., insert a dbg intrinsic call. Will be deprecated in future.
44-
LLVMDIBuilderInsertDbgValueIntrinsicBefore # New - Old behaviour of the changed functions above, i.e., insert a dbg intrinsic call. Will be deprecated in future.
45-
LLVMDIBuilderInsertDbgValueIntrinsicAtEnd # New - Old behaviour of the changed functions above, i.e., insert a dbg intrinsic call. Will be deprecated in future.
46-
```
47-
48-
4933
# Anything else?
5034

5135
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.

llvm/include/llvm-c/Core.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -744,14 +744,6 @@ LLVMModuleRef LLVMCloneModule(LLVMModuleRef M);
744744
*/
745745
void LLVMDisposeModule(LLVMModuleRef M);
746746

747-
/**
748-
* Returns true if the module is in the new debug info mode which uses
749-
* non-instruction debug records instead of debug intrinsics for variable
750-
* location tracking.
751-
* See See https://llvm.org/docs/RemoveDIsDebugInfo.html.
752-
*/
753-
LLVMBool LLVMIsNewDbgInfoFormat(LLVMModuleRef M);
754-
755747
/**
756748
* Obtain the identifier of a module.
757749
*

llvm/include/llvm-c/DebugInfo.h

Lines changed: 4 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,10 +1249,6 @@ LLVMMetadataRef LLVMDIBuilderCreateTempGlobalVariableFwdDecl(
12491249
LLVMMetadataRef Decl, uint32_t AlignInBits);
12501250

12511251
/**
1252-
* Soon to be deprecated.
1253-
* Only use in "old debug mode" (LLVMIsNewDbgFormat() is false).
1254-
* See https://llvm.org/docs/RemoveDIsDebugInfo.html
1255-
*
12561252
* Insert a new llvm.dbg.declare intrinsic call before the given instruction.
12571253
* \param Builder The DIBuilder.
12581254
* \param Storage The storage of the variable to declare.
@@ -1261,31 +1257,12 @@ LLVMMetadataRef LLVMDIBuilderCreateTempGlobalVariableFwdDecl(
12611257
* \param DebugLoc Debug info location.
12621258
* \param Instr Instruction acting as a location for the new intrinsic.
12631259
*/
1264-
LLVMValueRef LLVMDIBuilderInsertDeclareIntrinsicBefore(
1265-
LLVMDIBuilderRef Builder, LLVMValueRef Storage, LLVMMetadataRef VarInfo,
1266-
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMValueRef Instr);
1267-
/**
1268-
* Only use in "new debug mode" (LLVMIsNewDbgFormat() is true).
1269-
* See https://llvm.org/docs/RemoveDIsDebugInfo.html
1270-
*
1271-
* Insert a Declare DbgRecord before the given instruction.
1272-
* \param Builder The DIBuilder.
1273-
* \param Storage The storage of the variable to declare.
1274-
* \param VarInfo The variable's debug info descriptor.
1275-
* \param Expr A complex location expression for the variable.
1276-
* \param DebugLoc Debug info location.
1277-
* \param Instr Instruction acting as a location for the new record.
1278-
*/
1279-
LLVMDbgRecordRef
1260+
LLVMValueRef
12801261
LLVMDIBuilderInsertDeclareBefore(LLVMDIBuilderRef Builder, LLVMValueRef Storage,
12811262
LLVMMetadataRef VarInfo, LLVMMetadataRef Expr,
12821263
LLVMMetadataRef DebugLoc, LLVMValueRef Instr);
12831264

12841265
/**
1285-
* Soon to be deprecated.
1286-
* Only use in "old debug mode" (LLVMIsNewDbgFormat() is false).
1287-
* See https://llvm.org/docs/RemoveDIsDebugInfo.html
1288-
*
12891266
* Insert a new llvm.dbg.declare intrinsic call at the end of the given basic
12901267
* block. If the basic block has a terminator instruction, the intrinsic is
12911268
* inserted before that terminator instruction.
@@ -1296,47 +1273,11 @@ LLVMDIBuilderInsertDeclareBefore(LLVMDIBuilderRef Builder, LLVMValueRef Storage,
12961273
* \param DebugLoc Debug info location.
12971274
* \param Block Basic block acting as a location for the new intrinsic.
12981275
*/
1299-
LLVMValueRef LLVMDIBuilderInsertDeclareIntrinsicAtEnd(
1300-
LLVMDIBuilderRef Builder, LLVMValueRef Storage, LLVMMetadataRef VarInfo,
1301-
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMBasicBlockRef Block);
1302-
/**
1303-
* Only use in "new debug mode" (LLVMIsNewDbgFormat() is true).
1304-
* See https://llvm.org/docs/RemoveDIsDebugInfo.html
1305-
*
1306-
* Insert a Declare DbgRecord at the end of the given basic block. If the basic
1307-
* block has a terminator instruction, the record is inserted before that
1308-
* terminator instruction.
1309-
* \param Builder The DIBuilder.
1310-
* \param Storage The storage of the variable to declare.
1311-
* \param VarInfo The variable's debug info descriptor.
1312-
* \param Expr A complex location expression for the variable.
1313-
* \param DebugLoc Debug info location.
1314-
* \param Block Basic block acting as a location for the new record.
1315-
*/
1316-
LLVMDbgRecordRef LLVMDIBuilderInsertDeclareAtEnd(
1276+
LLVMValueRef LLVMDIBuilderInsertDeclareAtEnd(
13171277
LLVMDIBuilderRef Builder, LLVMValueRef Storage, LLVMMetadataRef VarInfo,
13181278
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMBasicBlockRef Block);
13191279

13201280
/**
1321-
* Soon to be deprecated.
1322-
* Only use in "old debug mode" (Module::IsNewDbgInfoFormat is false).
1323-
* See https://llvm.org/docs/RemoveDIsDebugInfo.html
1324-
*
1325-
* Insert a new llvm.dbg.value intrinsic call before the given instruction.
1326-
* \param Builder The DIBuilder.
1327-
* \param Val The value of the variable.
1328-
* \param VarInfo The variable's debug info descriptor.
1329-
* \param Expr A complex location expression for the variable.
1330-
* \param DebugLoc Debug info location.
1331-
* \param Instr Instruction acting as a location for the new intrinsic.
1332-
*/
1333-
LLVMValueRef LLVMDIBuilderInsertDbgValueIntrinsicBefore(
1334-
LLVMDIBuilderRef Builder, LLVMValueRef Val, LLVMMetadataRef VarInfo,
1335-
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMValueRef Instr);
1336-
/**
1337-
* Only use in "new debug mode" (Module::IsNewDbgInfoFormat is true).
1338-
* See https://llvm.org/docs/RemoveDIsDebugInfo.html
1339-
*
13401281
* Insert a new llvm.dbg.value intrinsic call before the given instruction.
13411282
* \param Builder The DIBuilder.
13421283
* \param Val The value of the variable.
@@ -1345,33 +1286,12 @@ LLVMValueRef LLVMDIBuilderInsertDbgValueIntrinsicBefore(
13451286
* \param DebugLoc Debug info location.
13461287
* \param Instr Instruction acting as a location for the new intrinsic.
13471288
*/
1348-
LLVMDbgRecordRef
1289+
LLVMValueRef
13491290
LLVMDIBuilderInsertDbgValueBefore(LLVMDIBuilderRef Builder, LLVMValueRef Val,
13501291
LLVMMetadataRef VarInfo, LLVMMetadataRef Expr,
13511292
LLVMMetadataRef DebugLoc, LLVMValueRef Instr);
13521293

13531294
/**
1354-
* Soon to be deprecated.
1355-
* Only use in "old debug mode" (Module::IsNewDbgInfoFormat is false).
1356-
* See https://llvm.org/docs/RemoveDIsDebugInfo.html
1357-
*
1358-
* Insert a new llvm.dbg.value intrinsic call at the end of the given basic
1359-
* block. If the basic block has a terminator instruction, the intrinsic is
1360-
* inserted before that terminator instruction.
1361-
* \param Builder The DIBuilder.
1362-
* \param Val The value of the variable.
1363-
* \param VarInfo The variable's debug info descriptor.
1364-
* \param Expr A complex location expression for the variable.
1365-
* \param DebugLoc Debug info location.
1366-
* \param Block Basic block acting as a location for the new intrinsic.
1367-
*/
1368-
LLVMValueRef LLVMDIBuilderInsertDbgValueIntrinsicAtEnd(
1369-
LLVMDIBuilderRef Builder, LLVMValueRef Val, LLVMMetadataRef VarInfo,
1370-
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMBasicBlockRef Block);
1371-
/**
1372-
* Only use in "new debug mode" (Module::IsNewDbgInfoFormat is true).
1373-
* See https://llvm.org/docs/RemoveDIsDebugInfo.html
1374-
*
13751295
* Insert a new llvm.dbg.value intrinsic call at the end of the given basic
13761296
* block. If the basic block has a terminator instruction, the intrinsic is
13771297
* inserted before that terminator instruction.
@@ -1382,7 +1302,7 @@ LLVMValueRef LLVMDIBuilderInsertDbgValueIntrinsicAtEnd(
13821302
* \param DebugLoc Debug info location.
13831303
* \param Block Basic block acting as a location for the new intrinsic.
13841304
*/
1385-
LLVMDbgRecordRef LLVMDIBuilderInsertDbgValueAtEnd(
1305+
LLVMValueRef LLVMDIBuilderInsertDbgValueAtEnd(
13861306
LLVMDIBuilderRef Builder, LLVMValueRef Val, LLVMMetadataRef VarInfo,
13871307
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMBasicBlockRef Block);
13881308

llvm/include/llvm-c/Types.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,6 @@ typedef struct LLVMOpaqueJITEventListener *LLVMJITEventListenerRef;
169169
*/
170170
typedef struct LLVMOpaqueBinary *LLVMBinaryRef;
171171

172-
/**
173-
* @see llvm::DbgRecord
174-
*/
175-
typedef struct LLVMOpaqueDbgRecord *LLVMDbgRecordRef;
176-
177172
/**
178173
* @}
179174
*/

llvm/include/llvm/IR/DebugProgramInstruction.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -643,8 +643,6 @@ getDbgValueRange(DPMarker *DbgMarker) {
643643
return DbgMarker->getDbgValueRange();
644644
}
645645

646-
DEFINE_ISA_CONVERSION_FUNCTIONS(DbgRecord, LLVMDbgRecordRef);
647-
648646
} // namespace llvm
649647

650648
#endif // LLVM_IR_DEBUGPROGRAMINSTRUCTION_H

llvm/lib/IR/DebugInfo.cpp

Lines changed: 31 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,90 +1659,51 @@ LLVMMetadataRef LLVMDIBuilderCreateTempGlobalVariableFwdDecl(
16591659
unwrapDI<MDNode>(Decl), nullptr, AlignInBits));
16601660
}
16611661

1662-
LLVMValueRef LLVMDIBuilderInsertDeclareIntrinsicBefore(
1663-
LLVMDIBuilderRef Builder, LLVMValueRef Storage, LLVMMetadataRef VarInfo,
1664-
LLVMMetadataRef Expr, LLVMMetadataRef DL, LLVMValueRef Instr) {
1665-
return wrap(
1666-
unwrap(Builder)
1667-
->insertDeclare(unwrap(Storage), unwrap<DILocalVariable>(VarInfo),
1668-
unwrap<DIExpression>(Expr), unwrap<DILocation>(DL),
1669-
unwrap<Instruction>(Instr))
1670-
.get<Instruction *>());
1671-
}
1672-
LLVMDbgRecordRef
1662+
LLVMValueRef
16731663
LLVMDIBuilderInsertDeclareBefore(LLVMDIBuilderRef Builder, LLVMValueRef Storage,
16741664
LLVMMetadataRef VarInfo, LLVMMetadataRef Expr,
16751665
LLVMMetadataRef DL, LLVMValueRef Instr) {
1676-
return wrap(
1677-
unwrap(Builder)
1678-
->insertDeclare(unwrap(Storage), unwrap<DILocalVariable>(VarInfo),
1679-
unwrap<DIExpression>(Expr), unwrap<DILocation>(DL),
1680-
unwrap<Instruction>(Instr))
1681-
.get<DbgRecord *>());
1682-
}
1683-
1684-
LLVMValueRef LLVMDIBuilderInsertDeclareIntrinsicAtEnd(
1685-
LLVMDIBuilderRef Builder, LLVMValueRef Storage, LLVMMetadataRef VarInfo,
1686-
LLVMMetadataRef Expr, LLVMMetadataRef DL, LLVMBasicBlockRef Block) {
1687-
return wrap(unwrap(Builder)
1688-
->insertDeclare(unwrap(Storage),
1689-
unwrap<DILocalVariable>(VarInfo),
1690-
unwrap<DIExpression>(Expr),
1691-
unwrap<DILocation>(DL), unwrap(Block))
1692-
.get<Instruction *>());
1693-
}
1694-
LLVMDbgRecordRef
1666+
DbgInstPtr DbgInst = unwrap(Builder)->insertDeclare(
1667+
unwrap(Storage), unwrap<DILocalVariable>(VarInfo),
1668+
unwrap<DIExpression>(Expr), unwrap<DILocation>(DL),
1669+
unwrap<Instruction>(Instr));
1670+
assert(isa<Instruction *>(DbgInst) &&
1671+
"Inserted a DbgRecord into function using old debug info mode");
1672+
return wrap(cast<Instruction *>(DbgInst));
1673+
}
1674+
1675+
LLVMValueRef
16951676
LLVMDIBuilderInsertDeclareAtEnd(LLVMDIBuilderRef Builder, LLVMValueRef Storage,
16961677
LLVMMetadataRef VarInfo, LLVMMetadataRef Expr,
16971678
LLVMMetadataRef DL, LLVMBasicBlockRef Block) {
1698-
return wrap(unwrap(Builder)
1699-
->insertDeclare(unwrap(Storage),
1700-
unwrap<DILocalVariable>(VarInfo),
1701-
unwrap<DIExpression>(Expr),
1702-
unwrap<DILocation>(DL), unwrap(Block))
1703-
.get<DbgRecord *>());
1679+
DbgInstPtr DbgInst = unwrap(Builder)->insertDeclare(
1680+
unwrap(Storage), unwrap<DILocalVariable>(VarInfo),
1681+
unwrap<DIExpression>(Expr), unwrap<DILocation>(DL), unwrap(Block));
1682+
assert(isa<Instruction *>(DbgInst) &&
1683+
"Inserted a DbgRecord into function using old debug info mode");
1684+
return wrap(cast<Instruction *>(DbgInst));
17041685
}
17051686

1706-
LLVMValueRef LLVMDIBuilderInsertDbgValueIntrinsicBefore(
1687+
LLVMValueRef LLVMDIBuilderInsertDbgValueBefore(
17071688
LLVMDIBuilderRef Builder, LLVMValueRef Val, LLVMMetadataRef VarInfo,
17081689
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMValueRef Instr) {
1709-
return wrap(unwrap(Builder)
1710-
->insertDbgValueIntrinsic(
1711-
unwrap(Val), unwrap<DILocalVariable>(VarInfo),
1712-
unwrap<DIExpression>(Expr), unwrap<DILocation>(DebugLoc),
1713-
unwrap<Instruction>(Instr))
1714-
.get<Instruction *>());
1715-
}
1716-
LLVMDbgRecordRef LLVMDIBuilderInsertDbgValueBefore(
1717-
LLVMDIBuilderRef Builder, LLVMValueRef Val, LLVMMetadataRef VarInfo,
1718-
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMValueRef Instr) {
1719-
return wrap(unwrap(Builder)
1720-
->insertDbgValueIntrinsic(
1721-
unwrap(Val), unwrap<DILocalVariable>(VarInfo),
1722-
unwrap<DIExpression>(Expr), unwrap<DILocation>(DebugLoc),
1723-
unwrap<Instruction>(Instr))
1724-
.get<DbgRecord *>());
1690+
DbgInstPtr DbgInst = unwrap(Builder)->insertDbgValueIntrinsic(
1691+
unwrap(Val), unwrap<DILocalVariable>(VarInfo), unwrap<DIExpression>(Expr),
1692+
unwrap<DILocation>(DebugLoc), unwrap<Instruction>(Instr));
1693+
assert(isa<Instruction *>(DbgInst) &&
1694+
"Inserted a DbgRecord into function using old debug info mode");
1695+
return wrap(cast<Instruction *>(DbgInst));
17251696
}
17261697

1727-
LLVMValueRef LLVMDIBuilderInsertDbgValueIntrinsicAtEnd(
1728-
LLVMDIBuilderRef Builder, LLVMValueRef Val, LLVMMetadataRef VarInfo,
1729-
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMBasicBlockRef Block) {
1730-
return wrap(unwrap(Builder)
1731-
->insertDbgValueIntrinsic(
1732-
unwrap(Val), unwrap<DILocalVariable>(VarInfo),
1733-
unwrap<DIExpression>(Expr), unwrap<DILocation>(DebugLoc),
1734-
unwrap(Block))
1735-
.get<Instruction *>());
1736-
}
1737-
LLVMDbgRecordRef LLVMDIBuilderInsertDbgValueAtEnd(
1698+
LLVMValueRef LLVMDIBuilderInsertDbgValueAtEnd(
17381699
LLVMDIBuilderRef Builder, LLVMValueRef Val, LLVMMetadataRef VarInfo,
17391700
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMBasicBlockRef Block) {
1740-
return wrap(unwrap(Builder)
1741-
->insertDbgValueIntrinsic(
1742-
unwrap(Val), unwrap<DILocalVariable>(VarInfo),
1743-
unwrap<DIExpression>(Expr), unwrap<DILocation>(DebugLoc),
1744-
unwrap(Block))
1745-
.get<DbgRecord *>());
1701+
DbgInstPtr DbgInst = unwrap(Builder)->insertDbgValueIntrinsic(
1702+
unwrap(Val), unwrap<DILocalVariable>(VarInfo), unwrap<DIExpression>(Expr),
1703+
unwrap<DILocation>(DebugLoc), unwrap(Block));
1704+
assert(isa<Instruction *>(DbgInst) &&
1705+
"Inserted a DbgRecord into function using old debug info mode");
1706+
return wrap(cast<Instruction *>(DbgInst));
17461707
}
17471708

17481709
LLVMMetadataRef LLVMDIBuilderCreateAutoVariable(

llvm/tools/llvm-c-test/debuginfo.c

Lines changed: 12 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -135,38 +135,21 @@ int llvm_test_dibuilder(void) {
135135
LLVMMetadataRef FooParamVar1 =
136136
LLVMDIBuilderCreateParameterVariable(DIB, FunctionMetadata, "a", 1, 1, File,
137137
42, Int64Ty, true, 0);
138-
if (LLVMIsNewDbgInfoFormat(M))
139-
LLVMDIBuilderInsertDeclareAtEnd(
140-
DIB, LLVMConstInt(LLVMInt64Type(), 0, false), FooParamVar1,
141-
FooParamExpression, FooParamLocation, FooEntryBlock);
142-
else
143-
LLVMDIBuilderInsertDeclareIntrinsicAtEnd(
144-
DIB, LLVMConstInt(LLVMInt64Type(), 0, false), FooParamVar1,
145-
FooParamExpression, FooParamLocation, FooEntryBlock);
138+
LLVMDIBuilderInsertDeclareAtEnd(DIB, LLVMConstInt(LLVMInt64Type(), 0, false),
139+
FooParamVar1, FooParamExpression,
140+
FooParamLocation, FooEntryBlock);
146141
LLVMMetadataRef FooParamVar2 =
147142
LLVMDIBuilderCreateParameterVariable(DIB, FunctionMetadata, "b", 1, 2, File,
148143
42, Int64Ty, true, 0);
149-
150-
if (LLVMIsNewDbgInfoFormat(M))
151-
LLVMDIBuilderInsertDeclareAtEnd(
152-
DIB, LLVMConstInt(LLVMInt64Type(), 0, false), FooParamVar2,
153-
FooParamExpression, FooParamLocation, FooEntryBlock);
154-
else
155-
LLVMDIBuilderInsertDeclareIntrinsicAtEnd(
156-
DIB, LLVMConstInt(LLVMInt64Type(), 0, false), FooParamVar2,
157-
FooParamExpression, FooParamLocation, FooEntryBlock);
158-
144+
LLVMDIBuilderInsertDeclareAtEnd(DIB, LLVMConstInt(LLVMInt64Type(), 0, false),
145+
FooParamVar2, FooParamExpression,
146+
FooParamLocation, FooEntryBlock);
159147
LLVMMetadataRef FooParamVar3 =
160148
LLVMDIBuilderCreateParameterVariable(DIB, FunctionMetadata, "c", 1, 3, File,
161149
42, VectorTy, true, 0);
162-
if (LLVMIsNewDbgInfoFormat(M))
163-
LLVMDIBuilderInsertDeclareAtEnd(
164-
DIB, LLVMConstInt(LLVMInt64Type(), 0, false), FooParamVar3,
165-
FooParamExpression, FooParamLocation, FooEntryBlock);
166-
else
167-
LLVMDIBuilderInsertDeclareIntrinsicAtEnd(
168-
DIB, LLVMConstInt(LLVMInt64Type(), 0, false), FooParamVar3,
169-
FooParamExpression, FooParamLocation, FooEntryBlock);
150+
LLVMDIBuilderInsertDeclareAtEnd(DIB, LLVMConstInt(LLVMInt64Type(), 0, false),
151+
FooParamVar3, FooParamExpression,
152+
FooParamLocation, FooEntryBlock);
170153

171154
LLVMSetSubprogram(FooFunction, FunctionMetadata);
172155

@@ -183,12 +166,9 @@ int llvm_test_dibuilder(void) {
183166
LLVMValueRef FooVal1 = LLVMConstInt(LLVMInt64Type(), 0, false);
184167
LLVMMetadataRef FooVarValueExpr =
185168
LLVMDIBuilderCreateConstantValueExpression(DIB, 0);
186-
if (LLVMIsNewDbgInfoFormat(M))
187-
LLVMDIBuilderInsertDbgValueAtEnd(DIB, FooVal1, FooVar1, FooVarValueExpr,
188-
FooVarsLocation, FooVarBlock);
189-
else
190-
LLVMDIBuilderInsertDbgValueIntrinsicAtEnd(
191-
DIB, FooVal1, FooVar1, FooVarValueExpr, FooVarsLocation, FooVarBlock);
169+
170+
LLVMDIBuilderInsertDbgValueAtEnd(DIB, FooVal1, FooVar1, FooVarValueExpr,
171+
FooVarsLocation, FooVarBlock);
192172

193173
LLVMMetadataRef MacroFile =
194174
LLVMDIBuilderCreateTempMacroFile(DIB, NULL, 0, File);

0 commit comments

Comments
 (0)