[lld] r249198 - [ELF2/AArch64] Add comment and change name to match the one of the ABI.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 11:22:07 PDT 2015


Function names should start with a lowecase and be verb. What about
getAArch64Page?

On 2 October 2015 at 18:13, Davide Italiano via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Author: davide
> Date: Fri Oct  2 17:13:51 2015
> New Revision: 249198
>
> URL: http://llvm.org/viewvc/llvm-project?rev=249198&view=rev
> Log:
> [ELF2/AArch64] Add comment and change name to match the one of the ABI.
>
> Fix style while I'm here.
>
> Modified:
>     lld/trunk/ELF/Target.cpp
>
> Modified: lld/trunk/ELF/Target.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=249198&r1=249197&r2=249198&view=diff
> ==============================================================================
> --- lld/trunk/ELF/Target.cpp (original)
> +++ lld/trunk/ELF/Target.cpp Fri Oct  2 17:13:51 2015
> @@ -260,8 +260,11 @@ static void AArch64UpdateAdr(uint8_t *Lo
>    write32le(Location, (read32le(Location) & ~Mask) | ImmLo | ImmHi);
>  }
>
> -static uint64_t AArch64GetPage(uint64_t Address) {
> -  return (Address & (~static_cast<uint64_t>(0xFFF)));
> +// Page(Expr) is the page address of the expression Expr, defined
> +// as (Expr & ~0xFFF). (This applies even if the machine page size
> +// supported by the platform has a differen value).
> +static uint64_t AArch64GetPage(uint64_t Expr) {
> +  return Expr & (~static_cast<uint64_t>(0xFFF));
>  }
>
>  static void handle_ADR_PREL_LO21(uint8_t *Location, uint64_t S, int64_t A,
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list