llvm-project/llvm/lib/DWARFLinker
Alexey Lapshin 79c8f51c34 [DWARFLinker] Refactor clang modules loading code.
Current implementation of registerModuleReference() function not only
"registers" module reference, but also clones referenced module
(inside loadClangModule()). That may lead to cloning the module with
incorrect options (registerModuleReference() examines module references
and additionally accumulates MaxDwarfVersion and accel tables info).
Since accumulated options may differ from the current values,
it is incorrect to clone modules before options are fully accumulated.

This patch separates "cloning" code from "registering" code. So,
that accumulating option is done in the "registering stage" and
"cloning" is done after all modules are registered and options accumulated.
It also adds a callback for loaded compile units which can be used for
D132755 and D132371(to allow doing options accumulation outside
of DWARFLinker).

Differential Revision: https://reviews.llvm.org/D133047
2022-09-03 11:23:52 +03:00
..
CMakeLists.txt [DWARFLinker] Link against BinaryFormat 2021-01-08 18:57:36 -08:00
DWARFLinker.cpp [DWARFLinker] Refactor clang modules loading code. 2022-09-03 11:23:52 +03:00
DWARFLinkerCompileUnit.cpp [Reland][DebugInfo][llvm-dwarfutil] Combine overlapped address ranges. 2022-07-21 14:15:39 +03:00
DWARFLinkerDeclContext.cpp [llvm] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 11:24:15 -07:00
DWARFStreamer.cpp [Reland][DebugInfo][llvm-dwarfutil] Combine overlapped address ranges. 2022-07-21 14:15:39 +03:00