diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-11-27 02:58:24 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-11-27 02:58:24 +0000 |
commit | 6902e4146d426998ff6a94b16776c1b3f805a048 (patch) | |
tree | 2b2b74e40957fd69b89ac8dd58ef1c89fc0755bd /lib | |
parent | c9715fc7c329c85e0b7aa0884c9209fa1fe5b819 (diff) |
Fix the definition of the vfork() builtin on Haiku. PR14378.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168674 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AST/ASTContext.cpp | 9 | ||||
-rw-r--r-- | lib/Basic/TargetInfo.cpp | 1 | ||||
-rw-r--r-- | lib/Basic/Targets.cpp | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 5a9225000a..c4dbf5d46f 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -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 //===----------------------------------------------------------------------===// @@ -7247,6 +7253,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. diff --git a/lib/Basic/TargetInfo.cpp b/lib/Basic/TargetInfo.cpp index 3257526289..83d4e2bf63 100644 --- a/lib/Basic/TargetInfo.cpp +++ b/lib/Basic/TargetInfo.cpp @@ -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; diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 2091001dfc..ff7c4d5183 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -2781,6 +2781,7 @@ public: SizeType = UnsignedLong; IntPtrType = SignedLong; PtrDiffType = SignedLong; + ProcessIDType = SignedLong; this->UserLabelPrefix = ""; this->TLSSupported = false; } |