[lld] r309326 - Avoid warnings when asserts are disabled.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 27 14:42:42 PDT 2017
Author: rafael
Date: Thu Jul 27 14:42:42 2017
New Revision: 309326
URL: http://llvm.org/viewvc/llvm-project?rev=309326&view=rev
Log:
Avoid warnings when asserts are disabled.
Modified:
lld/trunk/ELF/LinkerScript.cpp
Modified: lld/trunk/ELF/LinkerScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=309326&r1=309325&r2=309326&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.cpp (original)
+++ lld/trunk/ELF/LinkerScript.cpp Thu Jul 27 14:42:42 2017
@@ -428,8 +428,7 @@ void LinkerScript::addOrphanSections(Out
});
if (I == End) {
Factory.addInputSec(S, Name);
- OutputSection *Sec = S->getOutputSection();
- assert(Sec->SectionIndex == INT_MAX);
+ assert(S->getOutputSection()->SectionIndex == INT_MAX);
} else {
OutputSection *Sec = cast<OutputSection>(*I);
Factory.addInputSec(S, Name, Sec);
More information about the llvm-commits
mailing list