aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-11-27 02:58:24 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-11-27 02:58:24 +0000
commit6902e4146d426998ff6a94b16776c1b3f805a048 (patch)
tree2b2b74e40957fd69b89ac8dd58ef1c89fc0755bd /lib/AST/ASTContext.cpp
parentc9715fc7c329c85e0b7aa0884c9209fa1fe5b819 (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/AST/ASTContext.cpp')
-rw-r--r--lib/AST/ASTContext.cpp9
1 files changed, 9 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.