Simplify. NFC.
authorRui Ueyama <ruiu@google.com>
Thu, 4 Feb 2016 23:39:35 +0000 (23:39 +0000)
committerRui Ueyama <ruiu@google.com>
Thu, 4 Feb 2016 23:39:35 +0000 (23:39 +0000)
llvm-svn: 259848

lld/ELF/OutputSections.cpp

index f1189e6..1d33818 100644 (file)
@@ -91,9 +91,9 @@ template <class ELFT> bool GotSection<ELFT>::addDynTlsEntry(SymbolBody *Sym) {
 template <class ELFT> bool GotSection<ELFT>::addCurrentModuleTlsIndex() {
   if (LocalTlsIndexOff != uint32_t(-1))
     return false;
+  LocalTlsIndexOff = Entries.size() * sizeof(uintX_t);
   Entries.push_back(nullptr);
   Entries.push_back(nullptr);
-  LocalTlsIndexOff = (Entries.size() - 2) * sizeof(uintX_t);
   return true;
 }