Avoid warnings when asserts are disabled.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 27 Jul 2017 21:42:42 +0000 (21:42 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 27 Jul 2017 21:42:42 +0000 (21:42 +0000)
llvm-svn: 309326

lld/ELF/LinkerScript.cpp

index 48ad826..d7da4a2 100644 (file)
@@ -428,8 +428,7 @@ void LinkerScript::addOrphanSections(OutputSectionFactory &Factory) {
     });
     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);