Some refactoring and cleanup (#1806)

* Use clang-tidy `misc-include-cleaner` for IWYU `#include` cleanup

* Use `std::optional<size_t>` instead of `ssize_t`

* Rename some functions in linkdefs.hpp

* Fix header order
This commit is contained in:
Rangi
2025-08-20 16:09:04 -04:00
committed by GitHub
parent 92ed6ece53
commit 3d155d5695
63 changed files with 271 additions and 118 deletions

View File

@@ -5,14 +5,15 @@
#include <deque>
#include <inttypes.h>
#include <stdint.h>
#include <variant>
#include <vector>
#include "diagnostics.hpp"
#include "helpers.hpp" // assume
#include "linkdefs.hpp"
#include "opmath.hpp"
#include "verbosity.hpp"
#include "link/main.hpp"
#include "link/section.hpp"
#include "link/symbol.hpp"
#include "link/warning.hpp"
@@ -566,7 +567,7 @@ static void applyFilePatches(Section &section, Section &dataSection) {
// Applies all of a section's patches, iterating over "components" of unionized sections
static void applyPatches(Section &section) {
if (!sect_HasData(section.type)) {
if (!sectTypeHasData(section.type)) {
return;
}