[llvm-branch-commits] [cfe-branch] r168819 - in /cfe/branches/release_32: ./ include/clang/AST/ASTContext.h include/clang/Basic/Builtins.def include/clang/Basic/TargetInfo.h lib/AST/ASTContext.cpp lib/Basic/TargetInfo.cpp lib/Basic/Targets.cpp
Pawel Wodnicki
pawel at 32bitmicro.com
Wed Nov 28 14:01:30 PST 2012
Author: pawel
Date: Wed Nov 28 16:01:30 2012
New Revision: 168819
URL: http://llvm.org/viewvc/llvm-project?rev=168819&view=rev
Log:
Merging r168674: into the 3.2 release branch.
Fix the definition of the vfork() builtin on Haiku. PR14378.
Modified:
cfe/branches/release_32/ (props changed)
cfe/branches/release_32/include/clang/AST/ASTContext.h
cfe/branches/release_32/include/clang/Basic/Builtins.def
cfe/branches/release_32/include/clang/Basic/TargetInfo.h
cfe/branches/release_32/lib/AST/ASTContext.cpp
cfe/branches/release_32/lib/Basic/TargetInfo.cpp
cfe/branches/release_32/lib/Basic/Targets.cpp
Propchange: cfe/branches/release_32/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Nov 28 16:01:30 2012
@@ -1,3 +1,3 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:167749,167762,167780,167788,167790,167813-167814,167868,167884,167920,167925,167935,168024,168063,168124,168269,168277-168278,168297,168355,168379
+/cfe/trunk:167749,167762,167780,167788,167790,167813-167814,167868,167884,167920,167925,167935,168024,168063,168124,168269,168277-168278,168297,168355,168379,168674
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_32/include/clang/AST/ASTContext.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_32/include/clang/AST/ASTContext.h?rev=168819&r1=168818&r2=168819&view=diff
==============================================================================
--- cfe/branches/release_32/include/clang/AST/ASTContext.h (original)
+++ cfe/branches/release_32/include/clang/AST/ASTContext.h Wed Nov 28 16:01:30 2012
@@ -1098,6 +1098,10 @@
/// <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;
Modified: cfe/branches/release_32/include/clang/Basic/Builtins.def
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_32/include/clang/Basic/Builtins.def?rev=168819&r1=168818&r2=168819&view=diff
==============================================================================
--- cfe/branches/release_32/include/clang/Basic/Builtins.def (original)
+++ cfe/branches/release_32/include/clang/Basic/Builtins.def Wed Nov 28 16:01:30 2012
@@ -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:
@@ -737,7 +738,7 @@
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
Modified: cfe/branches/release_32/include/clang/Basic/TargetInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_32/include/clang/Basic/TargetInfo.h?rev=168819&r1=168818&r2=168819&view=diff
==============================================================================
--- cfe/branches/release_32/include/clang/Basic/TargetInfo.h (original)
+++ cfe/branches/release_32/include/clang/Basic/TargetInfo.h Wed Nov 28 16:01:30 2012
@@ -172,7 +172,8 @@
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.
///
@@ -213,7 +214,7 @@
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.
///
Modified: cfe/branches/release_32/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_32/lib/AST/ASTContext.cpp?rev=168819&r1=168818&r2=168819&view=diff
==============================================================================
--- cfe/branches/release_32/lib/AST/ASTContext.cpp (original)
+++ cfe/branches/release_32/lib/AST/ASTContext.cpp Wed Nov 28 16:01:30 2012
@@ -3534,6 +3534,12 @@
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
//===----------------------------------------------------------------------===//
@@ -7217,6 +7223,9 @@
return QualType();
}
break;
+ case 'p':
+ Type = Context.getProcessIDType();
+ break;
}
// If there are modifiers and if we're allowed to parse them, go for it.
Modified: cfe/branches/release_32/lib/Basic/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_32/lib/Basic/TargetInfo.cpp?rev=168819&r1=168818&r2=168819&view=diff
==============================================================================
--- cfe/branches/release_32/lib/Basic/TargetInfo.cpp (original)
+++ cfe/branches/release_32/lib/Basic/TargetInfo.cpp Wed Nov 28 16:01:30 2012
@@ -60,6 +60,7 @@
Char32Type = UnsignedInt;
Int64Type = SignedLongLong;
SigAtomicType = SignedInt;
+ ProcessIDType = SignedInt;
UseSignedCharForObjCBool = true;
UseBitFieldTypeAlignment = true;
UseZeroLengthBitfieldAlignment = false;
Modified: cfe/branches/release_32/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_32/lib/Basic/Targets.cpp?rev=168819&r1=168818&r2=168819&view=diff
==============================================================================
--- cfe/branches/release_32/lib/Basic/Targets.cpp (original)
+++ cfe/branches/release_32/lib/Basic/Targets.cpp Wed Nov 28 16:01:30 2012
@@ -2765,6 +2765,7 @@
SizeType = UnsignedLong;
IntPtrType = SignedLong;
PtrDiffType = SignedLong;
+ ProcessIDType = SignedLong;
this->UserLabelPrefix = "";
this->TLSSupported = false;
}
More information about the llvm-branch-commits
mailing list