[PATCH] D113541: [lld-macho] Fix trailing slash in oso_prefix

Vincent Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 10 19:57:09 PST 2021


thevinster accepted this revision.
thevinster added a comment.

Nice find!



================
Comment at: lld/MachO/Driver.cpp:1160-1162
+      if (config->osoPrefix.equals("."))
+        expanded += sep;
+      else if (config->osoPrefix.endswith(sep))
----------------
We can simplify this with a `||` in the first if? Could we also document the behavior of `real_path` here (that it removes the trailing slash)?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113541



More information about the llvm-commits mailing list