[all-commits] [llvm/llvm-project] f858fb: [lld][Macho][NFC] Encapsulate priorities map in a ...

Roger Kim via All-commits all-commits at lists.llvm.org
Wed Mar 23 10:57:45 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f858fba631d559c479d4728e3ea90098563f649e
      https://github.com/llvm/llvm-project/commit/f858fba631d559c479d4728e3ea90098563f649e
  Author: Roger Kim <rgr at fb.com>
  Date:   2022-03-23 (Wed, 23 Mar 2022)

  Changed paths:
    M lld/MachO/Config.h
    M lld/MachO/Driver.cpp
    M lld/MachO/SectionPriorities.cpp
    M lld/MachO/SectionPriorities.h
    M lld/MachO/Writer.cpp

  Log Message:
  -----------
  [lld][Macho][NFC] Encapsulate priorities map in a priority class

`config->priorities` has been used to hold the intermediate state during the construction of the order in which sections should be laid out. This is not a good place to hold this state since the intermediate state is not a "configuration" for LLD. It should be encapsulated in a class for building a mapping from section to priority (which I created in this diff as the `PriorityBuilder` class).

The same thing is being done for `config->callGraphProfile`.

Reviewed By: #lld-macho, int3

Differential Revision: https://reviews.llvm.org/D122156




More information about the All-commits mailing list