[PATCH] D88065: [lld-macho] Make lld::getInteger() tolerate leading "0x"/"0X" when base is 16
Greg McGary via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 19:29:35 PDT 2020
gkm added a comment.
I just added the rational to the diff summary.
While inspecting ld64, I leaned that it uses `strtoull(3)` for parsing hex command-line args, and `strtoull(3)` does this: " If base is zero or 16, the string may then include a "0x" prefix, and the number will be read in base 16"
How will it be used? Somewhere in the wild, we will avoid bugs.
I can test by addding a leading 0x to a test case in `headerpad.s`. It does not merit a test of its own.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88065/new/
https://reviews.llvm.org/D88065
More information about the llvm-commits
mailing list