[lld] r250934 - ELF2: Avoid bitwise-OR hack. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 21 12:41:03 PDT 2015
Author: ruiu
Date: Wed Oct 21 14:41:03 2015
New Revision: 250934
URL: http://llvm.org/viewvc/llvm-project?rev=250934&view=rev
Log:
ELF2: Avoid bitwise-OR hack. NFC.
The previous code is too clever that that needs a bit more
brain power than this new code.
Modified:
lld/trunk/ELF/Symbols.cpp
Modified: lld/trunk/ELF/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.cpp?rev=250934&r1=250933&r2=250934&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.cpp (original)
+++ lld/trunk/ELF/Symbols.cpp Wed Oct 21 14:41:03 2015
@@ -43,8 +43,8 @@ template <class ELFT> int SymbolBody::co
Visibility = Other->Visibility =
getMinVisibility(Visibility, Other->Visibility);
- IsUsedInRegularObj |= Other->IsUsedInRegularObj;
- Other->IsUsedInRegularObj |= IsUsedInRegularObj;
+ if (IsUsedInRegularObj || Other->IsUsedInRegularObj)
+ IsUsedInRegularObj = Other->IsUsedInRegularObj = true;
if (L != R)
return -1;
More information about the llvm-commits
mailing list