ld64 is cool with leading 0x for hex command-line args, and we should be also.
- Group Reviewers
- rG703d3f25976c: [lld-macho] Make lld::getInteger() tolerate leading "0x"/"0X" when base is 16
I just added the rationale 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 am unclear about the intention of your statement. Are you suggesting that I change base to 0 and let to_integer() strip the 0x ?