@@ -1615,22 +1615,28 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
1615
1615
template <class T > friend class TypePropertyCache ;
1616
1616
1617
1617
// / TypeClass bitfield - Enum that specifies what subclass this belongs to.
1618
+ LLVM_PREFERRED_TYPE (TypeClass)
1618
1619
unsigned TC : 8 ;
1619
1620
1620
1621
// / Store information on the type dependency.
1622
+ LLVM_PREFERRED_TYPE (TypeDependence)
1621
1623
unsigned Dependence : llvm::BitWidth<TypeDependence>;
1622
1624
1623
1625
// / True if the cache (i.e. the bitfields here starting with
1624
1626
// / 'Cache') is valid.
1627
+ LLVM_PREFERRED_TYPE (bool )
1625
1628
mutable unsigned CacheValid : 1 ;
1626
1629
1627
1630
// / Linkage of this type.
1631
+ LLVM_PREFERRED_TYPE (Linkage)
1628
1632
mutable unsigned CachedLinkage : 3 ;
1629
1633
1630
1634
// / Whether this type involves and local or unnamed types.
1635
+ LLVM_PREFERRED_TYPE (bool )
1631
1636
mutable unsigned CachedLocalOrUnnamed : 1 ;
1632
1637
1633
1638
// / Whether this type comes from an AST file.
1639
+ LLVM_PREFERRED_TYPE (bool )
1634
1640
mutable unsigned FromAST : 1 ;
1635
1641
1636
1642
bool isCacheValid () const {
@@ -1656,10 +1662,12 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
1656
1662
class ArrayTypeBitfields {
1657
1663
friend class ArrayType ;
1658
1664
1665
+ LLVM_PREFERRED_TYPE (TypeBitfields)
1659
1666
unsigned : NumTypeBits;
1660
1667
1661
1668
// / CVR qualifiers from declarations like
1662
1669
// / 'int X[static restrict 4]'. For function parameters only.
1670
+ LLVM_PREFERRED_TYPE (Qualifiers)
1663
1671
unsigned IndexTypeQuals : 3 ;
1664
1672
1665
1673
// / Storage class qualifiers from declarations like
@@ -1672,15 +1680,18 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
1672
1680
class ConstantArrayTypeBitfields {
1673
1681
friend class ConstantArrayType ;
1674
1682
1683
+ LLVM_PREFERRED_TYPE (ArrayTypeBitfields)
1675
1684
unsigned : NumArrayTypeBits;
1676
1685
1677
1686
// / Whether we have a stored size expression.
1687
+ LLVM_PREFERRED_TYPE (bool )
1678
1688
unsigned HasStoredSizeExpr : 1 ;
1679
1689
};
1680
1690
1681
1691
class BuiltinTypeBitfields {
1682
1692
friend class BuiltinType ;
1683
1693
1694
+ LLVM_PREFERRED_TYPE (TypeBitfields)
1684
1695
unsigned : NumTypeBits;
1685
1696
1686
1697
// / The kind (BuiltinType::Kind) of builtin type this is.
@@ -1695,15 +1706,18 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
1695
1706
friend class FunctionProtoType ;
1696
1707
friend class FunctionType ;
1697
1708
1709
+ LLVM_PREFERRED_TYPE (TypeBitfields)
1698
1710
unsigned : NumTypeBits;
1699
1711
1700
1712
// / Extra information which affects how the function is called, like
1701
1713
// / regparm and the calling convention.
1714
+ LLVM_PREFERRED_TYPE (CallingConv)
1702
1715
unsigned ExtInfo : 13 ;
1703
1716
1704
1717
// / The ref-qualifier associated with a \c FunctionProtoType.
1705
1718
// /
1706
1719
// / This is a value of type \c RefQualifierKind.
1720
+ LLVM_PREFERRED_TYPE (RefQualifierKind)
1707
1721
unsigned RefQualifier : 2 ;
1708
1722
1709
1723
// / Used only by FunctionProtoType, put here to pack with the
@@ -1712,8 +1726,10 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
1712
1726
// /
1713
1727
// / C++ 8.3.5p4: The return type, the parameter type list and the
1714
1728
// / cv-qualifier-seq, [...], are part of the function type.
1729
+ LLVM_PREFERRED_TYPE (Qualifiers)
1715
1730
unsigned FastTypeQuals : Qualifiers::FastWidth;
1716
1731
// / Whether this function has extended Qualifiers.
1732
+ LLVM_PREFERRED_TYPE (bool )
1717
1733
unsigned HasExtQuals : 1 ;
1718
1734
1719
1735
// / The number of parameters this function has, not counting '...'.
@@ -1723,24 +1739,30 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
1723
1739
unsigned NumParams : 16 ;
1724
1740
1725
1741
// / The type of exception specification this function has.
1742
+ LLVM_PREFERRED_TYPE (ExceptionSpecificationType)
1726
1743
unsigned ExceptionSpecType : 4 ;
1727
1744
1728
1745
// / Whether this function has extended parameter information.
1746
+ LLVM_PREFERRED_TYPE (bool )
1729
1747
unsigned HasExtParameterInfos : 1 ;
1730
1748
1731
1749
// / Whether this function has extra bitfields for the prototype.
1750
+ LLVM_PREFERRED_TYPE (bool )
1732
1751
unsigned HasExtraBitfields : 1 ;
1733
1752
1734
1753
// / Whether the function is variadic.
1754
+ LLVM_PREFERRED_TYPE (bool )
1735
1755
unsigned Variadic : 1 ;
1736
1756
1737
1757
// / Whether this function has a trailing return type.
1758
+ LLVM_PREFERRED_TYPE (bool )
1738
1759
unsigned HasTrailingReturn : 1 ;
1739
1760
};
1740
1761
1741
1762
class ObjCObjectTypeBitfields {
1742
1763
friend class ObjCObjectType ;
1743
1764
1765
+ LLVM_PREFERRED_TYPE (TypeBitfields)
1744
1766
unsigned : NumTypeBits;
1745
1767
1746
1768
// / The number of type arguments stored directly on this object type.
@@ -1750,12 +1772,14 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
1750
1772
unsigned NumProtocols : 6 ;
1751
1773
1752
1774
// / Whether this is a "kindof" type.
1775
+ LLVM_PREFERRED_TYPE (bool )
1753
1776
unsigned IsKindOf : 1 ;
1754
1777
};
1755
1778
1756
1779
class ReferenceTypeBitfields {
1757
1780
friend class ReferenceType ;
1758
1781
1782
+ LLVM_PREFERRED_TYPE (TypeBitfields)
1759
1783
unsigned : NumTypeBits;
1760
1784
1761
1785
// / True if the type was originally spelled with an lvalue sigil.
@@ -1769,19 +1793,23 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
1769
1793
// / ref &&a; // lvalue, inner ref
1770
1794
// / rvref &a; // lvalue, inner ref, spelled lvalue
1771
1795
// / rvref &&a; // rvalue, inner ref
1796
+ LLVM_PREFERRED_TYPE (bool )
1772
1797
unsigned SpelledAsLValue : 1 ;
1773
1798
1774
1799
// / True if the inner type is a reference type. This only happens
1775
1800
// / in non-canonical forms.
1801
+ LLVM_PREFERRED_TYPE (bool )
1776
1802
unsigned InnerRef : 1 ;
1777
1803
};
1778
1804
1779
1805
class TypeWithKeywordBitfields {
1780
1806
friend class TypeWithKeyword ;
1781
1807
1808
+ LLVM_PREFERRED_TYPE (TypeBitfields)
1782
1809
unsigned : NumTypeBits;
1783
1810
1784
1811
// / An ElaboratedTypeKeyword. 8 bits for efficient access.
1812
+ LLVM_PREFERRED_TYPE (ElaboratedTypeKeyword)
1785
1813
unsigned Keyword : 8 ;
1786
1814
};
1787
1815
@@ -1790,21 +1818,24 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
1790
1818
class ElaboratedTypeBitfields {
1791
1819
friend class ElaboratedType ;
1792
1820
1793
- unsigned : NumTypeBits;
1821
+ LLVM_PREFERRED_TYPE (TypeWithKeywordBitfields)
1794
1822
unsigned : NumTypeWithKeywordBits;
1795
1823
1796
1824
// / Whether the ElaboratedType has a trailing OwnedTagDecl.
1825
+ LLVM_PREFERRED_TYPE (bool )
1797
1826
unsigned HasOwnedTagDecl : 1 ;
1798
1827
};
1799
1828
1800
1829
class VectorTypeBitfields {
1801
1830
friend class VectorType ;
1802
1831
friend class DependentVectorType ;
1803
1832
1833
+ LLVM_PREFERRED_TYPE (TypeBitfields)
1804
1834
unsigned : NumTypeBits;
1805
1835
1806
1836
// / The kind of vector, either a generic vector type or some
1807
1837
// / target-specific vector type such as for AltiVec or Neon.
1838
+ LLVM_PREFERRED_TYPE (VectorKind)
1808
1839
unsigned VecKind : 4 ;
1809
1840
// / The number of elements in the vector.
1810
1841
uint32_t NumElements;
@@ -1813,19 +1844,22 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
1813
1844
class AttributedTypeBitfields {
1814
1845
friend class AttributedType ;
1815
1846
1847
+ LLVM_PREFERRED_TYPE (TypeBitfields)
1816
1848
unsigned : NumTypeBits;
1817
1849
1818
- // / An AttributedType ::Kind
1850
+ LLVM_PREFERRED_TYPE (attr ::Kind)
1819
1851
unsigned AttrKind : 32 - NumTypeBits;
1820
1852
};
1821
1853
1822
1854
class AutoTypeBitfields {
1823
1855
friend class AutoType ;
1824
1856
1857
+ LLVM_PREFERRED_TYPE (TypeBitfields)
1825
1858
unsigned : NumTypeBits;
1826
1859
1827
1860
// / Was this placeholder type spelled as 'auto', 'decltype(auto)',
1828
1861
// / or '__auto_type'? AutoTypeKeyword value.
1862
+ LLVM_PREFERRED_TYPE (AutoTypeKeyword)
1829
1863
unsigned Keyword : 2 ;
1830
1864
1831
1865
// / The number of template arguments in the type-constraints, which is
@@ -1842,33 +1876,41 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
1842
1876
friend class TypeOfType ;
1843
1877
friend class TypeOfExprType ;
1844
1878
1879
+ LLVM_PREFERRED_TYPE (TypeBitfields)
1845
1880
unsigned : NumTypeBits;
1881
+ LLVM_PREFERRED_TYPE (bool )
1846
1882
unsigned IsUnqual : 1 ; // If true: typeof_unqual, else: typeof
1847
1883
};
1848
1884
1849
1885
class UsingBitfields {
1850
1886
friend class UsingType ;
1851
1887
1888
+ LLVM_PREFERRED_TYPE (TypeBitfields)
1852
1889
unsigned : NumTypeBits;
1853
1890
1854
1891
// / True if the underlying type is different from the declared one.
1892
+ LLVM_PREFERRED_TYPE (bool )
1855
1893
unsigned hasTypeDifferentFromDecl : 1 ;
1856
1894
};
1857
1895
1858
1896
class TypedefBitfields {
1859
1897
friend class TypedefType ;
1860
1898
1899
+ LLVM_PREFERRED_TYPE (TypeBitfields)
1861
1900
unsigned : NumTypeBits;
1862
1901
1863
1902
// / True if the underlying type is different from the declared one.
1903
+ LLVM_PREFERRED_TYPE (bool )
1864
1904
unsigned hasTypeDifferentFromDecl : 1 ;
1865
1905
};
1866
1906
1867
1907
class SubstTemplateTypeParmTypeBitfields {
1868
1908
friend class SubstTemplateTypeParmType ;
1869
1909
1910
+ LLVM_PREFERRED_TYPE (TypeBitfields)
1870
1911
unsigned : NumTypeBits;
1871
1912
1913
+ LLVM_PREFERRED_TYPE (bool )
1872
1914
unsigned HasNonCanonicalUnderlyingType : 1 ;
1873
1915
1874
1916
// The index of the template parameter this substitution represents.
@@ -1885,6 +1927,7 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
1885
1927
class SubstTemplateTypeParmPackTypeBitfields {
1886
1928
friend class SubstTemplateTypeParmPackType ;
1887
1929
1930
+ LLVM_PREFERRED_TYPE (TypeBitfields)
1888
1931
unsigned : NumTypeBits;
1889
1932
1890
1933
// The index of the template parameter this substitution represents.
@@ -1900,9 +1943,11 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
1900
1943
class TemplateSpecializationTypeBitfields {
1901
1944
friend class TemplateSpecializationType ;
1902
1945
1946
+ LLVM_PREFERRED_TYPE (TypeBitfields)
1903
1947
unsigned : NumTypeBits;
1904
1948
1905
1949
// / Whether this template specialization type is a substituted type alias.
1950
+ LLVM_PREFERRED_TYPE (bool )
1906
1951
unsigned TypeAlias : 1 ;
1907
1952
1908
1953
// / The number of template arguments named in this class template
@@ -1918,6 +1963,7 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
1918
1963
class DependentTemplateSpecializationTypeBitfields {
1919
1964
friend class DependentTemplateSpecializationType ;
1920
1965
1966
+ LLVM_PREFERRED_TYPE (TypeWithKeywordBitfields)
1921
1967
unsigned : NumTypeWithKeywordBits;
1922
1968
1923
1969
// / The number of template arguments named in this class template
@@ -1933,6 +1979,7 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
1933
1979
class PackExpansionTypeBitfields {
1934
1980
friend class PackExpansionType ;
1935
1981
1982
+ LLVM_PREFERRED_TYPE (TypeBitfields)
1936
1983
unsigned : NumTypeBits;
1937
1984
1938
1985
// / The number of expansions that this pack expansion will
0 commit comments