Unverified Commit 91120733 authored by Orlando Cazalet-Hyams's avatar Orlando Cazalet-Hyams Committed by GitHub
Browse files

[RemoveDIs][NFC] Fix rotten green C API test (#92362)

`llvm_test_dibuilder(/*NewDebugInfoMode=*/true)` isn't currently executed in 
`return llvm_test_dibuilder(false) && llvm_test_dibuilder(true);`
because `llvm_test_dibuilder` returns 0 for success.

Split the llvm-c-test flag `--test-dibuilder` into two, one for the old and
one for the new debug info format. Add another lit test for the new format.

Now that the test actually runs, it crashes using the new format with
`llvm/lib/IR/LLVMContextImpl.cpp:53:llvm::LLVMContextImpl::~LLVMContextImpl(): Assertion 'TrailingDbgRecords.empty() && "DbgRecords in blocks not cleaned"' failed. Aborted`.

Insert terminators into the blocks so that we don't leave the debug records
trailing, unattached to any instructions, which fixes that.
parent fdaad738
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment