[lld] r273142 - Fixed compilation error under MSVS 2015 (looks like compiler bug). NFC.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 20 03:01:51 PDT 2016


Author: grimar
Date: Mon Jun 20 05:01:50 2016
New Revision: 273142

URL: http://llvm.org/viewvc/llvm-project?rev=273142&view=rev
Log:
Fixed compilation error under MSVS 2015 (looks like compiler bug). NFC.

Modified:
    lld/trunk/ELF/OutputSections.cpp

Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=273142&r1=273141&r2=273142&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Mon Jun 20 05:01:50 2016
@@ -271,7 +271,8 @@ template <class ELFT> void GotSection<EL
   auto AddEntry = [&](const MipsGotEntry &SA) {
     uint8_t *Entry = Buf;
     Buf += sizeof(uintX_t);
-    uintX_t VA = SA.first->template getVA<ELFT>(SA.second);
+    const SymbolBody* Body = SA.first;
+    uintX_t VA = Body->template getVA<ELFT>(SA.second);
     write<uintX_t, ELFT::TargetEndianness, sizeof(uintX_t)>(Entry, VA);
   };
   std::for_each(std::begin(MipsLocal), std::end(MipsLocal), AddEntry);




More information about the llvm-commits mailing list