[lld] r298082 - [ELF] - Fix warning.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 17 06:15:36 PDT 2017
Author: grimar
Date: Fri Mar 17 08:15:35 2017
New Revision: 298082
URL: http://llvm.org/viewvc/llvm-project?rev=298082&view=rev
Log:
[ELF] - Fix warning.
Writer.cpp:361:3: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
Modified:
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=298082&r1=298081&r2=298082&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Fri Mar 17 08:15:35 2017
@@ -358,8 +358,8 @@ template <class ELFT> void Writer<ELFT>:
Add(In<ELFT>::BuildId);
}
- if (In<ELFT>::Common = createCommonSection<ELFT>())
- Add(In<ELFT>::Common);
+ if (auto *Sec = createCommonSection<ELFT>())
+ Add(Sec);
In<ELFT>::Bss = make<BssSection>(".bss");
Add(In<ELFT>::Bss);
More information about the llvm-commits
mailing list