[lld-macho] Rename CallGraphSort.{h,cpp} to SectionPriorities
authorLeonard Grey <lgrey@chromium.org>
Mon, 24 Jan 2022 21:51:51 +0000 (16:51 -0500)
committerLeonard Grey <lgrey@chromium.org>
Tue, 25 Jan 2022 17:15:14 +0000 (12:15 -0500)
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
lld/MachO/SectionPriorities.cpp [moved from lld/MachO/CallGraphSort.cpp with 98% similarity]
lld/MachO/SectionPriorities.h [moved from lld/MachO/CallGraphSort.h with 78% similarity]
lld/MachO/Writer.cpp
llvm/utils/gn/secondary/lld/MachO/BUILD.gn

index 61f5c70..4bd0816 100644 (file)
@@ -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
similarity index 98%
rename from lld/MachO/CallGraphSort.cpp
rename to lld/MachO/SectionPriorities.cpp
index 7a0192e..5e63ceb 100644 (file)
@@ -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"
similarity index 78%
rename from lld/MachO/CallGraphSort.h
rename to lld/MachO/SectionPriorities.h
index 034f54a..f510d31 100644 (file)
@@ -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"
index c76dc69..1fafda9 100644 (file)
@@ -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"
index 4d8a050..6b457a9 100644 (file)
@@ -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",