[lld] r272475 - Merge two if(s) into one, simplifying the code.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 11 07:21:38 PDT 2016
Author: davide
Date: Sat Jun 11 09:21:38 2016
New Revision: 272475
URL: http://llvm.org/viewvc/llvm-project?rev=272475&view=rev
Log:
Merge two if(s) into one, simplifying the code.
Modified:
lld/trunk/ELF/LTO.cpp
Modified: lld/trunk/ELF/LTO.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LTO.cpp?rev=272475&r1=272474&r2=272475&view=diff
==============================================================================
--- lld/trunk/ELF/LTO.cpp (original)
+++ lld/trunk/ELF/LTO.cpp Sat Jun 11 09:21:38 2016
@@ -140,12 +140,8 @@ static void runLTOPasses(Module &M, Targ
static bool shouldInternalize(const SmallPtrSet<GlobalValue *, 8> &Used,
Symbol *S, GlobalValue *GV) {
- if (S->IsUsedInRegularObj)
+ if (S->IsUsedInRegularObj || Used.count(GV))
return false;
-
- if (Used.count(GV))
- return false;
-
return !S->includeInDynsym();
}
More information about the llvm-commits
mailing list