summaryrefslogtreecommitdiff
path: root/lld/MachO/Driver.cpp
diff options
context:
space:
mode:
authoralx32 <103613512+alx32@users.noreply.github.com>2024-03-25 06:55:11 -0700
committerGitHub <noreply@github.com>2024-03-25 06:55:11 -0700
commite1a003dbbd016f57b349c87981bf210f8ec3e1e0 (patch)
tree04017c8b4820be7e761b83bcfd26586e0d30a9ae /lld/MachO/Driver.cpp
parente6f63a942a45e3545332cd9a43982a69a4d5667b (diff)
[lld-macho][NFC] Refactor ObjCSelRefsSection => ObjCSelRefsHelper (#86456)
In a previous PR: https://github.com/llvm/llvm-project/pull/83878, the intent was to make no functional changes, just refactor out the code for reuse. However, by creating `ObjCSelRefsSection` as a `SyntheticSection` - this slightly changed the functionality of the application as the `SyntheticSection` constructor registers the `SyntheticSection` as a functional one - with an associated `SyntheticInputSection`. With this change we remove this unintended consequence by making the code not use a `SyntheticSection` as base, but just by having it be a static helper.
Diffstat (limited to 'lld/MachO/Driver.cpp')
-rw-r--r--lld/MachO/Driver.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lld/MachO/Driver.cpp b/lld/MachO/Driver.cpp
index 919a14b8bcf0..14c111ce9685 100644
--- a/lld/MachO/Driver.cpp
+++ b/lld/MachO/Driver.cpp
@@ -1394,6 +1394,7 @@ bool link(ArrayRef<const char *> argsArr, llvm::raw_ostream &stdoutOS,
syntheticSections.clear();
thunkMap.clear();
unprocessedLCLinkerOptions.clear();
+ ObjCSelRefsHelper::cleanup();
firstTLVDataSection = nullptr;
tar = nullptr;