[ELF] - Simplify. NFCI.
authorGeorge Rimar <grimar@accesssoftek.com>
Thu, 4 Oct 2018 09:31:15 +0000 (09:31 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Thu, 4 Oct 2018 09:31:15 +0000 (09:31 +0000)
Assign the `Link` to parent directly.

llvm-svn: 343762

lld/ELF/SyntheticSections.cpp

index 954bff2..e47c7a9 100644 (file)
@@ -1494,10 +1494,8 @@ void RelocationBaseSection::finalizeContents() {
   // If all relocations are R_*_RELATIVE they don't refer to any
   // dynamic symbol and we don't need a dynamic symbol table. If that
   // is the case, just use 0 as the link.
-  Link = In.DynSymTab ? In.DynSymTab->getParent()->SectionIndex : 0;
-
-  // Set required output section properties.
-  getParent()->Link = Link;
+  getParent()->Link =
+      In.DynSymTab ? In.DynSymTab->getParent()->SectionIndex : 0;
 }
 
 RelrBaseSection::RelrBaseSection()