mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-03-13 12:43:14 +00:00
------------------------------------------------------------------------ r226044 | dexonsmith | 2015-01-14 13:58:17 -0800 (Wed, 14 Jan 2015) | 15 lines IR: Drop metadata references more aggressively during teardown Sometimes teardown happens before the debug info graph is complete (e.g., when clang throws an error). In that case, `MDNode`s will still have RAUW, so deleting constants that the `MDNode`s point at will be relatively expensive -- it'll cause re-uniquing all up the chain (what I've been referring to as "teardown madness"). So, drop references *before* deleting constants. We need to drop a few more references now: the metadata side of the metadata/value bridges needs to be dropped off the cliff along with the rest of it (previously, the bridges were cleaned before we did anything with the `MDNode`s). There's no real functionality change here -- state before and after `LLVMContextImpl::~LLVMContextImpl()` is unchanged -- so no testcase. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@226091 91177308-0d34-0410-b5e6-96231b3b80d8
5.5 KiB
5.5 KiB