From f23d57a63266354902f36b79f2ad8557e201b3bc Mon Sep 17 00:00:00 2001 From: Leonard Grey Date: Mon, 24 Jan 2022 16:51:51 -0500 Subject: [PATCH] [lld-macho] Rename CallGraphSort.{h,cpp} to SectionPriorities This is in preparation for moving the code that parses and processes order files into this file. See https://reviews.llvm.org/D117354 for context and discussion. --- lld/MachO/CMakeLists.txt | 2 +- lld/MachO/{CallGraphSort.cpp => SectionPriorities.cpp} | 4 ++-- lld/MachO/{CallGraphSort.h => SectionPriorities.h} | 6 +++--- lld/MachO/Writer.cpp | 2 +- llvm/utils/gn/secondary/lld/MachO/BUILD.gn | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) rename lld/MachO/{CallGraphSort.cpp => SectionPriorities.cpp} (98%) rename lld/MachO/{CallGraphSort.h => SectionPriorities.h} (78%) diff --git a/lld/MachO/CMakeLists.txt b/lld/MachO/CMakeLists.txt index 61f5c70005b9..4bd0816bca66 100644 --- a/lld/MachO/CMakeLists.txt +++ b/lld/MachO/CMakeLists.txt @@ -10,7 +10,6 @@ add_lld_library(lldMachO Arch/ARM64Common.cpp Arch/ARM64_32.cpp Arch/X86_64.cpp - CallGraphSort.cpp ConcatOutputSection.cpp Driver.cpp DriverUtils.cpp @@ -26,6 +25,7 @@ add_lld_library(lldMachO OutputSection.cpp OutputSegment.cpp Relocations.cpp + SectionPriorities.cpp SymbolTable.cpp Symbols.cpp SyntheticSections.cpp diff --git a/lld/MachO/CallGraphSort.cpp b/lld/MachO/SectionPriorities.cpp similarity index 98% rename from lld/MachO/CallGraphSort.cpp rename to lld/MachO/SectionPriorities.cpp index 7a0192ea691e..5e63ceb34d11 100644 --- a/lld/MachO/CallGraphSort.cpp +++ b/lld/MachO/SectionPriorities.cpp @@ -1,4 +1,4 @@ -//===- CallGraphSort.cpp --------------------------------------------------===// +//===- SectionPriorities.cpp ----------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -11,7 +11,7 @@ /// //===----------------------------------------------------------------------===// -#include "CallGraphSort.h" +#include "SectionPriorities.h" #include "Config.h" #include "InputFiles.h" #include "Symbols.h" diff --git a/lld/MachO/CallGraphSort.h b/lld/MachO/SectionPriorities.h similarity index 78% rename from lld/MachO/CallGraphSort.h rename to lld/MachO/SectionPriorities.h index 034f54a26089..f510d315e2c4 100644 --- a/lld/MachO/CallGraphSort.h +++ b/lld/MachO/SectionPriorities.h @@ -1,4 +1,4 @@ -//===- CallGraphSort.h ------------------------------------------*- C++ -*-===// +//===- SectionPriorities.h --------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLD_MACHO_CALL_GRAPH_SORT_H -#define LLD_MACHO_CALL_GRAPH_SORT_H +#ifndef LLD_MACHO_SECTION_PRIORITIES_H +#define LLD_MACHO_SECTION_PRIORITIES_H #include "InputSection.h" #include "llvm/ADT/DenseMap.h" diff --git a/lld/MachO/Writer.cpp b/lld/MachO/Writer.cpp index c76dc691346e..1fafda99e39d 100644 --- a/lld/MachO/Writer.cpp +++ b/lld/MachO/Writer.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include "Writer.h" -#include "CallGraphSort.h" #include "ConcatOutputSection.h" #include "Config.h" #include "InputFiles.h" @@ -15,6 +14,7 @@ #include "MapFile.h" #include "OutputSection.h" #include "OutputSegment.h" +#include "SectionPriorities.h" #include "SymbolTable.h" #include "Symbols.h" #include "SyntheticSections.h" diff --git a/llvm/utils/gn/secondary/lld/MachO/BUILD.gn b/llvm/utils/gn/secondary/lld/MachO/BUILD.gn index 4d8a050dcd8c..6b457a97f998 100644 --- a/llvm/utils/gn/secondary/lld/MachO/BUILD.gn +++ b/llvm/utils/gn/secondary/lld/MachO/BUILD.gn @@ -27,7 +27,6 @@ static_library("MachO") { "Arch/ARM64Common.cpp", "Arch/ARM64_32.cpp", "Arch/X86_64.cpp", - "CallGraphSort.cpp", "ConcatOutputSection.cpp", "Driver.cpp", "DriverUtils.cpp", @@ -43,6 +42,7 @@ static_library("MachO") { "OutputSection.cpp", "OutputSegment.cpp", "Relocations.cpp", + "SectionPriorities.cpp", "SymbolTable.cpp", "Symbols.cpp", "SyntheticSections.cpp",