[lld] r263762 - Make evaluation order explicit.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 17 16:36:19 PDT 2016


Author: rafael
Date: Thu Mar 17 18:36:19 2016
New Revision: 263762

URL: http://llvm.org/viewvc/llvm-project?rev=263762&view=rev
Log:
Make evaluation order explicit.

Modified:
    lld/trunk/ELF/Symbols.cpp

Modified: lld/trunk/ELF/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.cpp?rev=263762&r1=263761&r2=263762&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.cpp (original)
+++ lld/trunk/ELF/Symbols.cpp Thu Mar 17 18:36:19 2016
@@ -120,7 +120,8 @@ template <class ELFT> bool SymbolBody::i
 
 template <class ELFT>
 typename ELFT::uint SymbolBody::getVA(typename ELFT::uint Addend) const {
-  return getSymVA<ELFT>(*this, Addend) + Addend;
+  typename ELFT::uint OutVA = getSymVA<ELFT>(*this, Addend);
+  return OutVA + Addend;
 }
 
 template <class ELFT> typename ELFT::uint SymbolBody::getGotVA() const {




More information about the llvm-commits mailing list