[all-commits] [llvm/llvm-project] b4fa71: [LLD] Remove global state in lld/COFF

Amy Huang via All-commits all-commits at lists.llvm.org
Thu Sep 16 11:02:45 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b4fa71eed34d967195514fe9b0a5211fca2bc5bc
      https://github.com/llvm/llvm-project/commit/b4fa71eed34d967195514fe9b0a5211fca2bc5bc
  Author: Amy Huang <akhuang at google.com>
  Date:   2021-09-16 (Thu, 16 Sep 2021)

  Changed paths:
    M lld/COFF/CMakeLists.txt
    A lld/COFF/COFFLinkerContext.cpp
    A lld/COFF/COFFLinkerContext.h
    M lld/COFF/CallGraphSort.cpp
    M lld/COFF/CallGraphSort.h
    M lld/COFF/Chunks.cpp
    M lld/COFF/Chunks.h
    M lld/COFF/DLL.cpp
    M lld/COFF/DLL.h
    M lld/COFF/DebugTypes.cpp
    M lld/COFF/DebugTypes.h
    M lld/COFF/Driver.cpp
    M lld/COFF/Driver.h
    M lld/COFF/ICF.cpp
    M lld/COFF/ICF.h
    M lld/COFF/InputFiles.cpp
    M lld/COFF/InputFiles.h
    M lld/COFF/LLDMapFile.cpp
    M lld/COFF/LLDMapFile.h
    M lld/COFF/LTO.cpp
    M lld/COFF/LTO.h
    M lld/COFF/MapFile.cpp
    M lld/COFF/MapFile.h
    M lld/COFF/MarkLive.cpp
    M lld/COFF/MarkLive.h
    M lld/COFF/MinGW.cpp
    M lld/COFF/MinGW.h
    M lld/COFF/PDB.cpp
    M lld/COFF/PDB.h
    M lld/COFF/SymbolTable.cpp
    M lld/COFF/SymbolTable.h
    M lld/COFF/TypeMerger.h
    M lld/COFF/Writer.cpp
    M lld/COFF/Writer.h
    M lld/Common/Timer.cpp
    M lld/include/lld/Common/Timer.h
    M llvm/utils/gn/secondary/lld/COFF/BUILD.gn

  Log Message:
  -----------
  [LLD] Remove global state in lld/COFF

This patch removes globals from the lldCOFF library, by moving globals
into a context class (COFFLinkingContext) and passing it around wherever
it's needed.

See https://lists.llvm.org/pipermail/llvm-dev/2021-June/151184.html for
context about removing globals from LLD.

I also haven't moved the `driver` or `config` variables yet.

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




More information about the All-commits mailing list