This is an archive of the discontinued LLVM Phabricator instance.

[clang] Introduce SourceLocation::[U]IntTy typedefs.
ClosedPublic

Authored by simon_tatham on Jul 6 2021, 9:26 AM.

Details

Summary

This is part of a patch series working towards the ability to make
SourceLocation into a 64-bit type to handle larger translation units.

NFC: this patch introduces typedefs for the integer type used by
SourceLocation and makes all the boring changes to use the typedefs
everywhere, but for the moment, they are unconditionally defined to
uint32_t.

Patch originally by Mikhail Maltsev.

Diff Detail

Event Timeline

simon_tatham created this revision.Jul 6 2021, 9:26 AM
simon_tatham requested review of this revision.Jul 6 2021, 9:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 6 2021, 9:26 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
miyuki added a subscriber: miyuki.Jul 6 2021, 10:11 AM

LGTM

clang/include/clang/Basic/SourceLocation.h
96

Nit: the Ty suffix seems to be slightly more common than Type

simon_tatham retitled this revision from [clang] Introduce SourceLocation::[U]IntType typedefs. to [clang] Introduce SourceLocation::[U]IntTy typedefs..

Renamed types to [U]IntTy. This will affect some of the dependent patches too, but I agree that saving two characters is worthwhile – these names are long enough already :-)

tmatheson accepted this revision.Jul 20 2021, 6:01 AM
This revision is now accepted and ready to land.Jul 20 2021, 6:01 AM
This revision was landed with ongoing or failed builds.Jul 21 2021, 2:46 AM
This revision was automatically updated to reflect the committed changes.