Skip to content

Commit b3cc470

Browse files
committed
[ELF] Speed up Symbol::computeBinding. NFC
When computeBinding is inlined into includeInDynsym and computeIsPreemptible, the optimizer can remove the config->gnuUnique load.
1 parent 01a5162 commit b3cc470

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lld/ELF/Symbols.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ uint8_t Symbol::computeBinding() const {
273273
if ((visibility != STV_DEFAULT && visibility != STV_PROTECTED) ||
274274
(versionId == VER_NDX_LOCAL && !isLazy()))
275275
return STB_LOCAL;
276-
if (!config->gnuUnique && binding == STB_GNU_UNIQUE)
276+
if (binding == STB_GNU_UNIQUE && !config->gnuUnique)
277277
return STB_GLOBAL;
278278
return binding;
279279
}

0 commit comments

Comments
 (0)