Re: r333923 - This diff includes changes for supporting the following types.
Sorry. I did not notice this. I will be sure to add the title from the phabricator review as the first line next time. On Mon, Jun 4, 2018 at 9:44 AM Roman Lebedev wrote: > > Did you use `arc patch` to get the commit description? > Please make sure that the first line of the commit is reasonable. > In this case it is not reasonable. > > On Mon, Jun 4, 2018 at 7:07 PM, Leonard Chan via cfe-commits > wrote: > > Author: leonardchan > > Date: Mon Jun 4 09:07:52 2018 > > New Revision: 333923 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=333923=rev > > Log: > > This diff includes changes for supporting the following types. > > > > // Primary fixed point types > > signed short _Accum s_short_accum; > > signed _Accum s_accum; > > signed long _Accum s_long_accum; > > unsigned short _Accum u_short_accum; > > unsigned _Accum u_accum; > > unsigned long _Accum u_long_accum; > > > > // Aliased fixed point types > > short _Accum short_accum; > > _Accum accum; > > long _Accum long_accum; > > This diff only allows for declaration of the fixed point types. Assignment > > and other operations done on fixed point types according to > > http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1169.pdf will be added in > > future patches. The saturated versions of these types and the equivalent > > _Fract types will also be added in future patches. > > > > The tests included are for asserting that we can declare these types. > > > > Fixed the test that was failing by not checking for dso_local on some > > targets. > > > > Differential Revision: https://reviews.llvm.org/D46084 > > > > Added: > > cfe/trunk/test/Frontend/fixed_point.c > > cfe/trunk/test/Frontend/fixed_point_bit_widths.c > > cfe/trunk/test/Frontend/fixed_point_errors.c > > cfe/trunk/test/Frontend/fixed_point_errors.cpp > > cfe/trunk/test/Frontend/fixed_point_not_enabled.c > > Modified: > > cfe/trunk/include/clang-c/Index.h > > cfe/trunk/include/clang/AST/ASTContext.h > > cfe/trunk/include/clang/AST/BuiltinTypes.def > > cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td > > cfe/trunk/include/clang/Basic/LangOptions.def > > cfe/trunk/include/clang/Basic/Specifiers.h > > cfe/trunk/include/clang/Basic/TargetInfo.h > > cfe/trunk/include/clang/Basic/TokenKinds.def > > cfe/trunk/include/clang/Driver/Options.td > > cfe/trunk/include/clang/Sema/DeclSpec.h > > cfe/trunk/include/clang/Serialization/ASTBitCodes.h > > cfe/trunk/lib/AST/ASTContext.cpp > > cfe/trunk/lib/AST/ExprConstant.cpp > > cfe/trunk/lib/AST/ItaniumMangle.cpp > > cfe/trunk/lib/AST/MicrosoftMangle.cpp > > cfe/trunk/lib/AST/NSAPI.cpp > > cfe/trunk/lib/AST/Type.cpp > > cfe/trunk/lib/AST/TypeLoc.cpp > > cfe/trunk/lib/Analysis/PrintfFormatString.cpp > > cfe/trunk/lib/Basic/TargetInfo.cpp > > cfe/trunk/lib/CodeGen/CGDebugInfo.cpp > > cfe/trunk/lib/CodeGen/CodeGenTypes.cpp > > cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp > > cfe/trunk/lib/Driver/ToolChains/Clang.cpp > > cfe/trunk/lib/Frontend/CompilerInvocation.cpp > > cfe/trunk/lib/Index/USRGeneration.cpp > > cfe/trunk/lib/Parse/ParseDecl.cpp > > cfe/trunk/lib/Sema/DeclSpec.cpp > > cfe/trunk/lib/Sema/SemaTemplateVariadic.cpp > > cfe/trunk/lib/Sema/SemaType.cpp > > cfe/trunk/lib/Serialization/ASTCommon.cpp > > cfe/trunk/lib/Serialization/ASTReader.cpp > > cfe/trunk/tools/libclang/CXType.cpp > > > > Modified: cfe/trunk/include/clang-c/Index.h > > URL: > > http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang-c/Index.h?rev=333923=333922=333923=diff > > == > > --- cfe/trunk/include/clang-c/Index.h (original) > > +++ cfe/trunk/include/clang-c/Index.h Mon Jun 4 09:07:52 2018 > > @@ -3182,8 +3182,14 @@ enum CXTypeKind { > >CXType_Float128 = 30, > >CXType_Half = 31, > >CXType_Float16 = 32, > > + CXType_ShortAccum = 33, > > + CXType_Accum = 34, > > + CXType_LongAccum = 35, > > + CXType_UShortAccum = 36, > > + CXType_UAccum = 37, > > + CXType_ULongAccum = 38, > >CXType_FirstBuiltin = CXType_Void, > > - CXType_LastBuiltin = CXType_Float16, > > + CXType_LastBuiltin = CXType_ULongAccum, > > > >CXType_Complex = 100, > >CXType_Pointer = 101, > > > > Modified: cfe/trunk/include/clang/AST/ASTContext.h > > URL: > > http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTContext.h?rev=333923=333922=333923=diff > > == > > --- cfe/trunk/include/clang/AST/ASTContext.h (original) > > +++ cfe/trunk/include/clang/AST/ASTContext.h Mon Jun 4 09:07:52 2018 > > @@ -1007,6 +1007,9 @@ public: > >CanQualType UnsignedCharTy, UnsignedShortTy, UnsignedIntTy, > > UnsignedLongTy; > >CanQualType UnsignedLongLongTy, UnsignedInt128Ty; > >CanQualType FloatTy, DoubleTy, LongDoubleTy, Float128Ty; > > + CanQualType ShortAccumTy, AccumTy,
Re: r333923 - This diff includes changes for supporting the following types.
Did you use `arc patch` to get the commit description? Please make sure that the first line of the commit is reasonable. In this case it is not reasonable. On Mon, Jun 4, 2018 at 7:07 PM, Leonard Chan via cfe-commits wrote: > Author: leonardchan > Date: Mon Jun 4 09:07:52 2018 > New Revision: 333923 > > URL: http://llvm.org/viewvc/llvm-project?rev=333923=rev > Log: > This diff includes changes for supporting the following types. > > // Primary fixed point types > signed short _Accum s_short_accum; > signed _Accum s_accum; > signed long _Accum s_long_accum; > unsigned short _Accum u_short_accum; > unsigned _Accum u_accum; > unsigned long _Accum u_long_accum; > > // Aliased fixed point types > short _Accum short_accum; > _Accum accum; > long _Accum long_accum; > This diff only allows for declaration of the fixed point types. Assignment > and other operations done on fixed point types according to > http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1169.pdf will be added in > future patches. The saturated versions of these types and the equivalent > _Fract types will also be added in future patches. > > The tests included are for asserting that we can declare these types. > > Fixed the test that was failing by not checking for dso_local on some > targets. > > Differential Revision: https://reviews.llvm.org/D46084 > > Added: > cfe/trunk/test/Frontend/fixed_point.c > cfe/trunk/test/Frontend/fixed_point_bit_widths.c > cfe/trunk/test/Frontend/fixed_point_errors.c > cfe/trunk/test/Frontend/fixed_point_errors.cpp > cfe/trunk/test/Frontend/fixed_point_not_enabled.c > Modified: > cfe/trunk/include/clang-c/Index.h > cfe/trunk/include/clang/AST/ASTContext.h > cfe/trunk/include/clang/AST/BuiltinTypes.def > cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td > cfe/trunk/include/clang/Basic/LangOptions.def > cfe/trunk/include/clang/Basic/Specifiers.h > cfe/trunk/include/clang/Basic/TargetInfo.h > cfe/trunk/include/clang/Basic/TokenKinds.def > cfe/trunk/include/clang/Driver/Options.td > cfe/trunk/include/clang/Sema/DeclSpec.h > cfe/trunk/include/clang/Serialization/ASTBitCodes.h > cfe/trunk/lib/AST/ASTContext.cpp > cfe/trunk/lib/AST/ExprConstant.cpp > cfe/trunk/lib/AST/ItaniumMangle.cpp > cfe/trunk/lib/AST/MicrosoftMangle.cpp > cfe/trunk/lib/AST/NSAPI.cpp > cfe/trunk/lib/AST/Type.cpp > cfe/trunk/lib/AST/TypeLoc.cpp > cfe/trunk/lib/Analysis/PrintfFormatString.cpp > cfe/trunk/lib/Basic/TargetInfo.cpp > cfe/trunk/lib/CodeGen/CGDebugInfo.cpp > cfe/trunk/lib/CodeGen/CodeGenTypes.cpp > cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp > cfe/trunk/lib/Driver/ToolChains/Clang.cpp > cfe/trunk/lib/Frontend/CompilerInvocation.cpp > cfe/trunk/lib/Index/USRGeneration.cpp > cfe/trunk/lib/Parse/ParseDecl.cpp > cfe/trunk/lib/Sema/DeclSpec.cpp > cfe/trunk/lib/Sema/SemaTemplateVariadic.cpp > cfe/trunk/lib/Sema/SemaType.cpp > cfe/trunk/lib/Serialization/ASTCommon.cpp > cfe/trunk/lib/Serialization/ASTReader.cpp > cfe/trunk/tools/libclang/CXType.cpp > > Modified: cfe/trunk/include/clang-c/Index.h > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang-c/Index.h?rev=333923=333922=333923=diff > == > --- cfe/trunk/include/clang-c/Index.h (original) > +++ cfe/trunk/include/clang-c/Index.h Mon Jun 4 09:07:52 2018 > @@ -3182,8 +3182,14 @@ enum CXTypeKind { >CXType_Float128 = 30, >CXType_Half = 31, >CXType_Float16 = 32, > + CXType_ShortAccum = 33, > + CXType_Accum = 34, > + CXType_LongAccum = 35, > + CXType_UShortAccum = 36, > + CXType_UAccum = 37, > + CXType_ULongAccum = 38, >CXType_FirstBuiltin = CXType_Void, > - CXType_LastBuiltin = CXType_Float16, > + CXType_LastBuiltin = CXType_ULongAccum, > >CXType_Complex = 100, >CXType_Pointer = 101, > > Modified: cfe/trunk/include/clang/AST/ASTContext.h > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTContext.h?rev=333923=333922=333923=diff > == > --- cfe/trunk/include/clang/AST/ASTContext.h (original) > +++ cfe/trunk/include/clang/AST/ASTContext.h Mon Jun 4 09:07:52 2018 > @@ -1007,6 +1007,9 @@ public: >CanQualType UnsignedCharTy, UnsignedShortTy, UnsignedIntTy, UnsignedLongTy; >CanQualType UnsignedLongLongTy, UnsignedInt128Ty; >CanQualType FloatTy, DoubleTy, LongDoubleTy, Float128Ty; > + CanQualType ShortAccumTy, AccumTy, > + LongAccumTy; // ISO/IEC JTC1 SC22 WG14 N1169 Extension > + CanQualType UnsignedShortAccumTy, UnsignedAccumTy, UnsignedLongAccumTy; >CanQualType HalfTy; // [OpenCL 6.1.1.1], ARM NEON >CanQualType Float16Ty; // C11 extension ISO/IEC TS 18661-3 >CanQualType FloatComplexTy, DoubleComplexTy, LongDoubleComplexTy; > > Modified: cfe/trunk/include/clang/AST/BuiltinTypes.def > URL: >
r333923 - This diff includes changes for supporting the following types.
Author: leonardchan Date: Mon Jun 4 09:07:52 2018 New Revision: 333923 URL: http://llvm.org/viewvc/llvm-project?rev=333923=rev Log: This diff includes changes for supporting the following types. // Primary fixed point types signed short _Accum s_short_accum; signed _Accum s_accum; signed long _Accum s_long_accum; unsigned short _Accum u_short_accum; unsigned _Accum u_accum; unsigned long _Accum u_long_accum; // Aliased fixed point types short _Accum short_accum; _Accum accum; long _Accum long_accum; This diff only allows for declaration of the fixed point types. Assignment and other operations done on fixed point types according to http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1169.pdf will be added in future patches. The saturated versions of these types and the equivalent _Fract types will also be added in future patches. The tests included are for asserting that we can declare these types. Fixed the test that was failing by not checking for dso_local on some targets. Differential Revision: https://reviews.llvm.org/D46084 Added: cfe/trunk/test/Frontend/fixed_point.c cfe/trunk/test/Frontend/fixed_point_bit_widths.c cfe/trunk/test/Frontend/fixed_point_errors.c cfe/trunk/test/Frontend/fixed_point_errors.cpp cfe/trunk/test/Frontend/fixed_point_not_enabled.c Modified: cfe/trunk/include/clang-c/Index.h cfe/trunk/include/clang/AST/ASTContext.h cfe/trunk/include/clang/AST/BuiltinTypes.def cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td cfe/trunk/include/clang/Basic/LangOptions.def cfe/trunk/include/clang/Basic/Specifiers.h cfe/trunk/include/clang/Basic/TargetInfo.h cfe/trunk/include/clang/Basic/TokenKinds.def cfe/trunk/include/clang/Driver/Options.td cfe/trunk/include/clang/Sema/DeclSpec.h cfe/trunk/include/clang/Serialization/ASTBitCodes.h cfe/trunk/lib/AST/ASTContext.cpp cfe/trunk/lib/AST/ExprConstant.cpp cfe/trunk/lib/AST/ItaniumMangle.cpp cfe/trunk/lib/AST/MicrosoftMangle.cpp cfe/trunk/lib/AST/NSAPI.cpp cfe/trunk/lib/AST/Type.cpp cfe/trunk/lib/AST/TypeLoc.cpp cfe/trunk/lib/Analysis/PrintfFormatString.cpp cfe/trunk/lib/Basic/TargetInfo.cpp cfe/trunk/lib/CodeGen/CGDebugInfo.cpp cfe/trunk/lib/CodeGen/CodeGenTypes.cpp cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp cfe/trunk/lib/Driver/ToolChains/Clang.cpp cfe/trunk/lib/Frontend/CompilerInvocation.cpp cfe/trunk/lib/Index/USRGeneration.cpp cfe/trunk/lib/Parse/ParseDecl.cpp cfe/trunk/lib/Sema/DeclSpec.cpp cfe/trunk/lib/Sema/SemaTemplateVariadic.cpp cfe/trunk/lib/Sema/SemaType.cpp cfe/trunk/lib/Serialization/ASTCommon.cpp cfe/trunk/lib/Serialization/ASTReader.cpp cfe/trunk/tools/libclang/CXType.cpp Modified: cfe/trunk/include/clang-c/Index.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang-c/Index.h?rev=333923=333922=333923=diff == --- cfe/trunk/include/clang-c/Index.h (original) +++ cfe/trunk/include/clang-c/Index.h Mon Jun 4 09:07:52 2018 @@ -3182,8 +3182,14 @@ enum CXTypeKind { CXType_Float128 = 30, CXType_Half = 31, CXType_Float16 = 32, + CXType_ShortAccum = 33, + CXType_Accum = 34, + CXType_LongAccum = 35, + CXType_UShortAccum = 36, + CXType_UAccum = 37, + CXType_ULongAccum = 38, CXType_FirstBuiltin = CXType_Void, - CXType_LastBuiltin = CXType_Float16, + CXType_LastBuiltin = CXType_ULongAccum, CXType_Complex = 100, CXType_Pointer = 101, Modified: cfe/trunk/include/clang/AST/ASTContext.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTContext.h?rev=333923=333922=333923=diff == --- cfe/trunk/include/clang/AST/ASTContext.h (original) +++ cfe/trunk/include/clang/AST/ASTContext.h Mon Jun 4 09:07:52 2018 @@ -1007,6 +1007,9 @@ public: CanQualType UnsignedCharTy, UnsignedShortTy, UnsignedIntTy, UnsignedLongTy; CanQualType UnsignedLongLongTy, UnsignedInt128Ty; CanQualType FloatTy, DoubleTy, LongDoubleTy, Float128Ty; + CanQualType ShortAccumTy, AccumTy, + LongAccumTy; // ISO/IEC JTC1 SC22 WG14 N1169 Extension + CanQualType UnsignedShortAccumTy, UnsignedAccumTy, UnsignedLongAccumTy; CanQualType HalfTy; // [OpenCL 6.1.1.1], ARM NEON CanQualType Float16Ty; // C11 extension ISO/IEC TS 18661-3 CanQualType FloatComplexTy, DoubleComplexTy, LongDoubleComplexTy; Modified: cfe/trunk/include/clang/AST/BuiltinTypes.def URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/BuiltinTypes.def?rev=333923=333922=333923=diff == --- cfe/trunk/include/clang/AST/BuiltinTypes.def (original) +++ cfe/trunk/include/clang/AST/BuiltinTypes.def Mon Jun 4 09:07:52 2018 @@ -122,6 +122,26 @@ SIGNED_TYPE(LongLong, LongLongTy) // '__int128_t' SIGNED_TYPE(Int128, Int128Ty) +//===- Fixed point