This is an archive of the discontinued LLVM Phabricator instance.

Add StringRef::consumeInteger(APInt)
ClosedPublic

Authored by thopre on May 18 2023, 9:12 AM.

Details

Summary

This will be required to allow arbitrary precision support to
FileCheck's numeric variables and expressions. Note: as per
getAsInteger(), this does not support negative value. If there is
interest for that it can be added in a separate patch.

Diff Detail

Event Timeline

thopre created this revision.May 18 2023, 9:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2023, 9:12 AM
thopre requested review of this revision.May 18 2023, 9:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2023, 9:12 AM
dblaikie accepted this revision.May 19 2023, 1:31 PM

Sounds OK to me

This revision is now accepted and ready to land.May 19 2023, 1:31 PM
thopre updated this revision to Diff 524340.May 22 2023, 8:51 AM

Remove <64 bit APInt consumeInteger tests

Remove <64 bit APInt consumeInteger tests

These did not make sense, the whole point of consumeInteger(APInt) is to not be limited in bitsize and thus succeed. That's why unit tests were failing: they were expecting a consumeInteger failing when the expected value is bigger than 32bit.

Do you need someone to commit this for you? (if so, what name & email address would you like to be used to attribute the work?)

Do you need someone to commit this for you? (if so, what name & email address would you like to be used to attribute the work?)

I have commit access, thanks! I just wanted to have CI be green first since there was problem with the previous version (expecting APInt tests to fail for values < 64 bits which did not make sense).

This revision was landed with ongoing or failed builds.May 23 2023, 6:01 AM
This revision was automatically updated to reflect the committed changes.