Loading clang/include/clang/AST/ASTContext.h +4 −0 Original line number Diff line number Diff line Loading @@ -1098,6 +1098,10 @@ public: /// <stddef.h>. Pointer - pointer requires this (C99 6.5.6p9). QualType getPointerDiffType() const; /// \brief Return the unique type for "pid_t" defined in /// <sys/types.h>. We need this to compute the correct type for vfork(). QualType getProcessIDType() const; /// \brief Return the C structure type used to represent constant CFStrings. QualType getCFConstantStringType() const; Loading clang/include/clang/Basic/Builtins.def +2 −1 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ // J -> jmp_buf // SJ -> sigjmp_buf // K -> ucontext_t // p -> pid_t // . -> "...". This may only occur at the end of the function list. // // Types may be prefixed with the following modifiers: Loading Loading @@ -737,7 +738,7 @@ LIBBUILTIN(strcasecmp, "icC*cC*", "f", "strings.h", ALL_LANGUAGES) LIBBUILTIN(strncasecmp, "icC*cC*z", "f", "strings.h", ALL_LANGUAGES) // POSIX unistd.h LIBBUILTIN(_exit, "vi", "fr", "unistd.h", ALL_LANGUAGES) LIBBUILTIN(vfork, "i", "fj", "unistd.h", ALL_LANGUAGES) LIBBUILTIN(vfork, "p", "fj", "unistd.h", ALL_LANGUAGES) // POSIX setjmp.h // In some systems setjmp is a macro that expands to _setjmp. We undefine Loading clang/include/clang/Basic/TargetInfo.h +3 −2 Original line number Diff line number Diff line Loading @@ -172,7 +172,8 @@ public: protected: IntType SizeType, IntMaxType, UIntMaxType, PtrDiffType, IntPtrType, WCharType, WIntType, Char16Type, Char32Type, Int64Type, SigAtomicType; WIntType, Char16Type, Char32Type, Int64Type, SigAtomicType, ProcessIDType; /// \brief Whether Objective-C's built-in boolean type should be signed char. /// Loading Loading @@ -213,7 +214,7 @@ public: IntType getChar32Type() const { return Char32Type; } IntType getInt64Type() const { return Int64Type; } IntType getSigAtomicType() const { return SigAtomicType; } IntType getProcessIDType() const { return ProcessIDType; } /// \brief Return the width (in bits) of the specified integer type enum. /// Loading clang/lib/AST/ASTContext.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -3534,6 +3534,12 @@ QualType ASTContext::getPointerDiffType() const { return getFromTargetType(Target->getPtrDiffType(0)); } /// \brief Return the unique type for "pid_t" defined in /// <sys/types.h>. We need this to compute the correct type for vfork(). QualType ASTContext::getProcessIDType() const { return getFromTargetType(Target->getProcessIDType()); } //===----------------------------------------------------------------------===// // Type Operators //===----------------------------------------------------------------------===// Loading Loading @@ -7217,6 +7223,9 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context, return QualType(); } break; case 'p': Type = Context.getProcessIDType(); break; } // If there are modifiers and if we're allowed to parse them, go for it. Loading clang/lib/Basic/TargetInfo.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ TargetInfo::TargetInfo(const std::string &T) : TargetOpts(), Triple(T) Char32Type = UnsignedInt; Int64Type = SignedLongLong; SigAtomicType = SignedInt; ProcessIDType = SignedInt; UseSignedCharForObjCBool = true; UseBitFieldTypeAlignment = true; UseZeroLengthBitfieldAlignment = false; Loading Loading
clang/include/clang/AST/ASTContext.h +4 −0 Original line number Diff line number Diff line Loading @@ -1098,6 +1098,10 @@ public: /// <stddef.h>. Pointer - pointer requires this (C99 6.5.6p9). QualType getPointerDiffType() const; /// \brief Return the unique type for "pid_t" defined in /// <sys/types.h>. We need this to compute the correct type for vfork(). QualType getProcessIDType() const; /// \brief Return the C structure type used to represent constant CFStrings. QualType getCFConstantStringType() const; Loading
clang/include/clang/Basic/Builtins.def +2 −1 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ // J -> jmp_buf // SJ -> sigjmp_buf // K -> ucontext_t // p -> pid_t // . -> "...". This may only occur at the end of the function list. // // Types may be prefixed with the following modifiers: Loading Loading @@ -737,7 +738,7 @@ LIBBUILTIN(strcasecmp, "icC*cC*", "f", "strings.h", ALL_LANGUAGES) LIBBUILTIN(strncasecmp, "icC*cC*z", "f", "strings.h", ALL_LANGUAGES) // POSIX unistd.h LIBBUILTIN(_exit, "vi", "fr", "unistd.h", ALL_LANGUAGES) LIBBUILTIN(vfork, "i", "fj", "unistd.h", ALL_LANGUAGES) LIBBUILTIN(vfork, "p", "fj", "unistd.h", ALL_LANGUAGES) // POSIX setjmp.h // In some systems setjmp is a macro that expands to _setjmp. We undefine Loading
clang/include/clang/Basic/TargetInfo.h +3 −2 Original line number Diff line number Diff line Loading @@ -172,7 +172,8 @@ public: protected: IntType SizeType, IntMaxType, UIntMaxType, PtrDiffType, IntPtrType, WCharType, WIntType, Char16Type, Char32Type, Int64Type, SigAtomicType; WIntType, Char16Type, Char32Type, Int64Type, SigAtomicType, ProcessIDType; /// \brief Whether Objective-C's built-in boolean type should be signed char. /// Loading Loading @@ -213,7 +214,7 @@ public: IntType getChar32Type() const { return Char32Type; } IntType getInt64Type() const { return Int64Type; } IntType getSigAtomicType() const { return SigAtomicType; } IntType getProcessIDType() const { return ProcessIDType; } /// \brief Return the width (in bits) of the specified integer type enum. /// Loading
clang/lib/AST/ASTContext.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -3534,6 +3534,12 @@ QualType ASTContext::getPointerDiffType() const { return getFromTargetType(Target->getPtrDiffType(0)); } /// \brief Return the unique type for "pid_t" defined in /// <sys/types.h>. We need this to compute the correct type for vfork(). QualType ASTContext::getProcessIDType() const { return getFromTargetType(Target->getProcessIDType()); } //===----------------------------------------------------------------------===// // Type Operators //===----------------------------------------------------------------------===// Loading Loading @@ -7217,6 +7223,9 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context, return QualType(); } break; case 'p': Type = Context.getProcessIDType(); break; } // If there are modifiers and if we're allowed to parse them, go for it. Loading
clang/lib/Basic/TargetInfo.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ TargetInfo::TargetInfo(const std::string &T) : TargetOpts(), Triple(T) Char32Type = UnsignedInt; Int64Type = SignedLongLong; SigAtomicType = SignedInt; ProcessIDType = SignedInt; UseSignedCharForObjCBool = true; UseBitFieldTypeAlignment = true; UseZeroLengthBitfieldAlignment = false; Loading