[DWARFLinker] Convert analyzeContextInfo to a work list (NFC)
authorJonas Devlieghere <jonas@devlieghere.com>
Sat, 7 Nov 2020 18:45:17 +0000 (10:45 -0800)
committerJonas Devlieghere <jonas@devlieghere.com>
Sat, 7 Nov 2020 18:46:09 +0000 (10:46 -0800)
commit7f561f6aafb5cd3eafbbb6db1950660b47b272b2
tree68085b77eb6fb003f77948ea93dd283528b5c9c8
parent93c9110c980c9fc4bd72fb307c18f79afa0381e3
[DWARFLinker] Convert analyzeContextInfo to a work list (NFC)

Convert analyzeContextInfo to a work list using the same approach I used
to remove the recursion from lookForDIEsToKeep. This fixes the crash
reported in https://llvm.org/PR48029.

Tested using the reproducer attached to PR48029 as well as by comparing
the clang MD5 hashes before and after the change (with and without
gmodules).

Differential revision: https://reviews.llvm.org/D90873
llvm/lib/DWARFLinker/DWARFLinker.cpp