[PATCH] D98115: [lld-macho][NFC] Replace config param with a global in hasCompatVersion() helper.

Vy Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 6 08:33:18 PST 2021


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG70c0dbf151ab: [lld-macho][NFC] Replace config param with a global in hasCompatVersion()… (authored by oontvoo).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98115/new/

https://reviews.llvm.org/D98115

Files:
  lld/MachO/InputFiles.cpp


Index: lld/MachO/InputFiles.cpp
===================================================================
--- lld/MachO/InputFiles.cpp
+++ lld/MachO/InputFiles.cpp
@@ -339,10 +339,9 @@
 }
 
 // Checks if the version specified in `cmd` is compatible with target
-// version in `config`. IOW, check if cmd's version >= config's version.
+// version. IOW, check if cmd's version >= config's version.
 static bool hasCompatVersion(const InputFile *input,
-                             const build_version_command *cmd,
-                             const Configuration *config) {
+                             const build_version_command *cmd) {
 
   if (config->target.Platform != static_cast<PlatformKind>(cmd->platform)) {
     error(toString(input) + " has platform " +
@@ -512,7 +511,7 @@
 
   if (const auto *cmd =
           findCommand<build_version_command>(hdr, LC_BUILD_VERSION)) {
-    if (!hasCompatVersion(this, cmd, config))
+    if (!hasCompatVersion(this, cmd))
       return;
   }
 
@@ -673,7 +672,7 @@
 
   if (const build_version_command *cmd =
           findCommand<build_version_command>(hdr, LC_BUILD_VERSION)) {
-    if (!hasCompatVersion(this, cmd, config))
+    if (!hasCompatVersion(this, cmd))
       return;
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98115.328766.patch
Type: text/x-patch
Size: 1235 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210306/3fe201ef/attachment.bin>


More information about the llvm-commits mailing list