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

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 17 16:28:05 PDT 2016


On 13 March 2016 at 14:03, Rui Ueyama <ruiu at google.com> wrote:
> 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?

True. I will make it explicit.

Cheers,
Rafael


More information about the llvm-commits mailing list