Page MenuHomePhabricator

[Basic] Introduce PODSourceLocation, NFCI
Needs ReviewPublic

Authored by miyuki on Nov 6 2019, 9:19 AM.



The goal of this change is to further reduce the number of cases when
the internal representation of SourceLocation is accessed directly.

The change adds a new class PODSourceLocation and replaces 'unsigned'
with 'PODSourceLocation' where possible. The PODSourceLocation class
holds the same information as SourceLocation, but it is a POD type,
hence it can be used in contexts where SourceLocation cannot be used
(e.g. unions with implicit default constructors).

SourceLocation objects can be converted to PODSourceLocation and
constructed from PODSourceLocation using the corresponding helpers
getPOD and getFromPOD.

Diff Detail