llvm-c: Add LLVMDeleteInstruction to fix a test issue
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 4 Jul 2022 12:41:03 +0000 (14:41 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 7 Jul 2022 12:29:20 +0000 (14:29 +0200)
commitfdf7e437bfc9df20454361a3453e2811be9da56c
treef0dd68c0d78d1b3dc47263da361410e52c5c4e18
parent0f4339a835c0ccd43294054709090267454302fc
llvm-c: Add LLVMDeleteInstruction to fix a test issue

Not deleting the loose instruction with metadata associated to it causes
an assertion when the LLVMContext is destroyed. This was previously
hidden by the fact that llvm-c-test does not call LLVMShutdown. The
planned removal of ManagedStatic exposed this issue.

Differential Revision: https://reviews.llvm.org/D129114
llvm/docs/ReleaseNotes.rst
llvm/include/llvm-c/Core.h
llvm/lib/IR/Core.cpp
llvm/tools/llvm-c-test/metadata.c