llvm-6502/include/llvm
Duncan P. N. Exon Smith 0294f639d2 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/trunk@226044 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-14 21:58:17 +00:00
..
ADT [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
Analysis [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
AsmParser
Bitcode AsmParser/Bitcode: Add support for MDLocation 2015-01-13 21:10:44 +00:00
CodeGen Remove dead code for llvm.eh.selector in the old EH model 2015-01-14 18:49:39 +00:00
Config [multilib] Add support to the autoconf build to substitute 2014-12-29 11:58:17 +00:00
DebugInfo [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
ExecutionEngine [MCJIT] Unique-ptrify the RTDyldMemoryManager member of MCJIT. NFC. 2014-12-03 00:51:19 +00:00
IR IR: Drop metadata references more aggressively during teardown 2015-01-14 21:58:17 +00:00
IRReader
LineEditor
Linker Use the DiagnosticHandler to print diagnostics when reading bitcode. 2015-01-10 00:07:30 +00:00
LTO Remove StringMap::GetOrCreateValue in favor of StringMap::insert 2014-11-19 05:49:42 +00:00
MC Revert "Add r224985 back with two fixes." 2015-01-14 19:07:23 +00:00
Object [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
Option
ProfileData [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
Support Add comment about a gotcha I ran across while touching this code. 2015-01-14 19:59:18 +00:00
TableGen Make MultiClass::DefPrototypes own their Records to fix memory leaks. 2014-12-11 05:25:33 +00:00
Target [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
Transforms [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
CMakeLists.txt
InitializePasses.h Revert "Insert random noops to increase security against ROP attacks (llvm)" 2015-01-14 05:24:33 +00:00
LinkAllIR.h
LinkAllPasses.h [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
module.modulemap Update the modules build to match r223802. 2014-12-12 02:25:18 +00:00
module.modulemap.build
Pass.h
PassAnalysisSupport.h
PassInfo.h
PassManager.h
PassRegistry.h
PassSupport.h