diff options
author | Steve Naroff <snaroff@apple.com> | 2008-08-27 16:04:49 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2008-08-27 16:04:49 +0000 |
commit | 5618bd4a52c45fbbb605e3ba885663b2164db8a3 (patch) | |
tree | de48c6a25701bf5c027d7af42054e9a0c25e523b /lib/AST/TypeSerialization.cpp | |
parent | 30ad167f74cb8a04c35ced6c69b116f15d104f8e (diff) |
First wave of changes to support "blocks" (an extension to C).
This commit adds the declaration syntax (and associated type).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55417 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/TypeSerialization.cpp')
-rw-r--r-- | lib/AST/TypeSerialization.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/AST/TypeSerialization.cpp b/lib/AST/TypeSerialization.cpp index 68ef1114a7..9674726855 100644 --- a/lib/AST/TypeSerialization.cpp +++ b/lib/AST/TypeSerialization.cpp @@ -99,6 +99,10 @@ void Type::Create(ASTContext& Context, unsigned i, Deserializer& D) { case Type::Pointer: D.RegisterPtr(PtrID,PointerType::CreateImpl(Context,D)); break; + + case Type::BlockPointer: + D.RegisterPtr(PtrID,BlockPointerType::CreateImpl(Context,D)); + break; case Type::Tagged: D.RegisterPtr(PtrID,TagType::CreateImpl(Context,D)); @@ -130,6 +134,18 @@ Type* ASQualType::CreateImpl(ASTContext& Context, Deserializer& D) { } //===----------------------------------------------------------------------===// +// BlockPointerType +//===----------------------------------------------------------------------===// + +void BlockPointerType::EmitImpl(Serializer& S) const { + S.Emit(getPointeeType()); +} + +Type* BlockPointerType::CreateImpl(ASTContext& Context, Deserializer& D) { + return Context.getBlockPointerType(QualType::ReadVal(D)).getTypePtr(); +} + +//===----------------------------------------------------------------------===// // ComplexType //===----------------------------------------------------------------------===// |