diff --git a/lld/ELF/CallGraphSort.cpp b/lld/ELF/CallGraphSort.cpp index 35c59d6edb2a..0b1b4196de37 100644 --- a/lld/ELF/CallGraphSort.cpp +++ b/lld/ELF/CallGraphSort.cpp @@ -276,8 +276,8 @@ DenseMap CallGraphSort::run() { // Sort sections by the profile data using the Cache-Directed Sort algorithm. // The placement is done by optimizing the locality by co-locating frequently // executed code sections together. -DenseMap -elf::computeCacheDirectedSortOrder(Ctx &ctx) { +static DenseMap +computeCacheDirectedSortOrder(Ctx &ctx) { SmallVector funcSizes; SmallVector funcCounts; SmallVector callCounts; diff --git a/lld/ELF/CallGraphSort.h b/lld/ELF/CallGraphSort.h index 5f9987ce0973..89e6f617d921 100644 --- a/lld/ELF/CallGraphSort.h +++ b/lld/ELF/CallGraphSort.h @@ -15,9 +15,6 @@ namespace lld::elf { struct Ctx; class InputSectionBase; -llvm::DenseMap -computeCacheDirectedSortOrder(Ctx &); - llvm::DenseMap computeCallGraphProfileOrder(Ctx &); } // namespace lld::elf diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 3e92b7653e31..0ea2e60d8482 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -1083,7 +1083,6 @@ static void maybeShuffle(Ctx &ctx, // Builds section order for handling --symbol-ordering-file. static DenseMap buildSectionOrder(Ctx &ctx) { DenseMap sectionOrder; - // Use the rarely used option --call-graph-ordering-file to sort sections. if (!ctx.arg.callGraphProfile.empty()) return computeCallGraphProfileOrder(ctx);