[PATCH] D102655: [lld/mac] Inline a check

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 17 17:09:24 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGbc588f996111: [lld/mac] Inline a check (authored by thakis).
Herald added a project: LLVM.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102655

Files:
  lld/MachO/SyntheticSections.cpp


Index: lld/MachO/SyntheticSections.cpp
===================================================================
--- lld/MachO/SyntheticSections.cpp
+++ lld/MachO/SyntheticSections.cpp
@@ -587,9 +587,11 @@
   // Measurements show that symbol ordering (which again looks up
   // every symbol in a hashmap) is the biggest bottleneck when linking
   // chromium_framework, so this will likely be worth optimizing.
-  return config->exportedSymbols.empty()
-             ? !config->unexportedSymbols.match(defined->getName())
-             : config->exportedSymbols.match(defined->getName());
+  if (!config->exportedSymbols.empty())
+    return config->exportedSymbols.match(defined->getName());
+  if (!config->unexportedSymbols.empty())
+    return !config->unexportedSymbols.match(defined->getName());
+  return true;
 }
 
 void ExportSection::finalizeContents() {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102655.346020.patch
Type: text/x-patch
Size: 860 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210518/87ab146a/attachment.bin>


More information about the llvm-commits mailing list