[llvm] [RemoveDIs] Update DIBuilder C API with DbgRecord functions. (PR #95535)
Orlando Cazalet-Hyams via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 14 06:33:29 PDT 2024
================
@@ -137,38 +140,13 @@ int llvm_test_dibuilder(bool NewDebugInfoFormat) {
LLVMDIBuilderCreateParameterVariable(DIB, FunctionMetadata, "a", 1, 1, File,
42, Int64Ty, true, 0);
- if (LLVMIsNewDbgInfoFormat(M))
- LLVMDIBuilderInsertDeclareAtEnd(
- DIB, LLVMConstInt(LLVMInt64Type(), 0, false), FooParamVar1,
- FooParamExpression, FooParamLocation, FooEntryBlock);
- else
- LLVMDIBuilderInsertDeclareIntrinsicAtEnd(
- DIB, LLVMConstInt(LLVMInt64Type(), 0, false), FooParamVar1,
- FooParamExpression, FooParamLocation, FooEntryBlock);
----------------
OCHyams wrote:
The test should now call the `LLVMDIBuilderInsertDeclareRecord...` style functions. e.g. at this site:
delete the `if ... else ...`, and in its place instead just call `LLVMDIBuilderInsertDeclareRecordAtEnd(LLVMInt64Type(), 0, false), FooParamVar1,
FooParamExpression, FooParamLocation, FooEntryBlock);`
It looks like you've done that for the final block in the test but not the first 3.
Otherwise we're losing test coverage.
https://github.com/llvm/llvm-project/pull/95535
More information about the llvm-commits
mailing list