[all-commits] [llvm/llvm-project] 79c8f5: [DWARFLinker] Refactor clang modules loading code.
avl-llvm via All-commits
all-commits at lists.llvm.org
Sat Sep 3 01:25:48 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 79c8f51c34287f2e549e9f7cb1b866849229d84f
https://github.com/llvm/llvm-project/commit/79c8f51c34287f2e549e9f7cb1b866849229d84f
Author: Alexey Lapshin <a.v.lapshin at mail.ru>
Date: 2022-09-03 (Sat, 03 Sep 2022)
Changed paths:
M llvm/include/llvm/DWARFLinker/DWARFLinker.h
M llvm/lib/DWARFLinker/DWARFLinker.cpp
M llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list