There was no handling of uint64_t in the LLVM JSON library. This patch adds support for that.
The motivation is the https://reviews.llvm.org/D109217.
Details
Details
- Reviewers
dblaikie akhuang StephenTozer - Commits
- rG8c3adce81dc3: [JSON] Handle uint64_t type
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Looks mostly good, but I don't think the parsing side of things quite works: in order for us to ever parse a JSON value as an unsigned integer - including with parse<uint64_t> - we need to either produce unsigned Values in Parser::parseNumber, or allow getAsUINT64 to produce unsigned values from integer Values. As there is no real way to represent unsigned values in JSON, I think the latter makes more sense as it simply needs a check to ensure that the integer value is not negative.
Comment Actions
I haven't paid attention to the parse() part, but I should have. Hmm, I think parsing an int as unsigned via getAsUNIT64() is a better way IMO, so I'll do that way.