[cfe-commits] r118724 - in /cfe/trunk: include/clang/AST/ASTContext.h include/clang/AST/Type.h lib/AST/ASTContext.cpp lib/AST/ASTImporter.cpp lib/AST/TypePrinter.cpp lib/CodeGen/Mangle.cpp lib/Sema/SemaChecking.cpp lib/Sema/SemaInit.cpp lib/Sema/

Frits van Bommel fvbommel at gmail.com
Wed Nov 10 14:17:45 PST 2010


On Wed, Nov 10, 2010 at 10:56 PM, Bob Wilson <bob.wilson at apple.com> wrote:
> ==============================================================================
> --- cfe/trunk/include/clang/AST/Type.h (original)
> +++ cfe/trunk/include/clang/AST/Type.h Wed Nov 10 15:56:12 2010
> @@ -929,9 +929,9 @@
>
>     unsigned : NumTypeBits;
>
> -    /// AltiVecSpec - AltiVec-specific vector information, used
> -    /// to differentiate things like 'pixel'.
> -    unsigned AltiVecSpec : 2;
> +    /// VecKind - The kind of vector, either a generic vector type or some
> +    /// target-specific vector type such as for AltiVec or Neon.
> +    unsigned VecKind : 2;
>
>     /// NumElements - The number of elements in the vector.
>     unsigned NumElements : 30 - NumTypeBits;
> @@ -1913,29 +1913,30 @@
>  /// client is responsible for converting the size into the number of elements.
>  class VectorType : public Type, public llvm::FoldingSetNode {
>  public:
> -  enum AltiVecSpecific {
> -    NotAltiVec,  // is not AltiVec vector
> -    AltiVec,     // is AltiVec vector
> -    Pixel,       // is AltiVec 'vector Pixel'
> -    Bool         // is AltiVec 'vector bool ...'
> +  enum VectorKind {
> +    GenericVector,  // not a target-specific vector type
> +    AltiVecVector,  // is AltiVec vector
> +    AltiVecPixel,   // is AltiVec 'vector Pixel'
> +    AltiVecBool,    // is AltiVec 'vector bool ...'
> +    NeonVector      // is ARM Neon vector
>   };

Now that this enum has 5 elements, doesn't the VecKind bitfield above
need an extra bit?




More information about the cfe-commits mailing list