[PATCH] D103746: [lld][MachO] Add support for $ld$install_name symbols

Alexander Shaposhnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 5 10:29:53 PDT 2021


alexshap added inline comments.


================
Comment at: lld/MachO/InputFiles.cpp:987
 
-  StringRef installName;
-  StringRef compatVersion;
-  StringRef platformStr;
-  StringRef startVersion;
-  StringRef endVersion;
-  StringRef symbolName;
-  StringRef rest;
-
-  std::tie(installName, name) = name.split('$');
-  std::tie(compatVersion, name) = name.split('$');
-  std::tie(platformStr, name) = name.split('$');
-  std::tie(startVersion, name) = name.split('$');
-  std::tie(endVersion, symbolName) = name.split('$');
-  std::tie(symbolName, rest) = symbolName.split('$');
-  // TODO: ld64 contains some logic for non-empty symbolName as well.
-  if (!symbolName.empty())
-    return true;
-  unsigned platform;
-  if (platformStr.getAsInteger(10, platform) ||
-      platform != static_cast<unsigned>(config->platform()))
-    return true;
+  if (action == "previous") {
+    StringRef installName;
----------------
int3 wrote:
> how about splitting out each action handler into its own function?
yeah, i also was inclined to split them out


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103746



More information about the llvm-commits mailing list