[PATCH] D18056: Compute value of local symbol with getVA.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 13 14:03:59 PDT 2016


ruiu added inline comments.

================
Comment at: ELF/Symbols.cpp:103
@@ +102,3 @@
+SymbolBody::getVA(typename ELFFile<ELFT>::uintX_t Addend) const {
+  return getSymVA<ELFT>(*this, Addend) + Addend;
+}
----------------
Addend is passed by reference and a new value may be assigned in getSymVA. So, doesn't this expression depend on the order of evaluation? If Addend is evaluated first and then the function is called, you will get a different value, no?


http://reviews.llvm.org/D18056





More information about the llvm-commits mailing list