aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authoralx32 <103613512+alx32@users.noreply.github.com>2024-03-21 14:50:44 -0700
committerGitHub <noreply@github.com>2024-03-21 14:50:44 -0700
commitb609a4d7ea8b716f5f0ec83d10945362f42e730d (patch)
tree28be8b417931ee8daebdffcf31558c8de717be93 /clang/lib/Frontend/CompilerInvocation.cpp
parentb19bf3e888f95c35bf641cd0eee18a8da702f6fe (diff)
downloadllvm-b609a4d7ea8b716f5f0ec83d10945362f42e730d.zip
llvm-b609a4d7ea8b716f5f0ec83d10945362f42e730d.tar.gz
llvm-b609a4d7ea8b716f5f0ec83d10945362f42e730d.tar.bz2
[lld-macho][NFC] Refactor insertions into inputSections (#85692)
Before this change, after `InputSection` objects are created, they need to be added to the appropriate container for tracking. The logic for selecting the appropriate container lives in `Driver.cpp` / `gatherInputSections`, where the `InputSection` is added to the matching container depending on the input config and the type of `InputSection`. Also, multiple other locations also insert directly into `inputSections` array - assuming that that is the appropriate container for the `InputSection`'s they create. Currently this is the correct assumption, however an upcoming feature will change this. For an upcoming feature (relative method lists), we need to route `InputSection`'s either to `inputSections` array or to a synthetic section, depending on weather the relative method list optimization is enabled or not. We can achieve the above either by duplicating some of the logic or refactoring the routing and `InputSection`'s and reusing that. The refactoring & code sharing approach seems the correct way to go - as such this diff performs the refactoring while not introducing any functional changes. Later on we can just call `addInputSection` and not have to worry about routing logic. ---------
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions