@@ -90,6 +90,7 @@ impl Type {
90
90
TypeKind :: Array ( ..) |
91
91
TypeKind :: Reference ( ..) |
92
92
TypeKind :: Pointer ( ..) |
93
+ TypeKind :: BlockPointer |
93
94
TypeKind :: Int ( ..) |
94
95
TypeKind :: Float ( ..) |
95
96
TypeKind :: Named ( ..) => true ,
@@ -124,8 +125,9 @@ impl Type {
124
125
TypeKind :: Comp ( ref ci)
125
126
=> ci. layout ( type_resolver) ,
126
127
// FIXME(emilio): This is a hack for anonymous union templates.
127
- // Use the actual pointer size!
128
- TypeKind :: Pointer ( ..)
128
+ // Use the actual pointer size!
129
+ TypeKind :: Pointer ( ..) |
130
+ TypeKind :: BlockPointer
129
131
=> Some ( Layout :: new ( mem:: size_of :: < * mut ( ) > ( ) , mem:: align_of :: < * mut ( ) > ( ) ) ) ,
130
132
TypeKind :: ResolvedTypeRef ( inner)
131
133
=> type_resolver. resolve_type ( inner) . layout ( type_resolver) ,
@@ -286,6 +288,7 @@ impl Type {
286
288
TypeKind :: Reference ( ..) |
287
289
TypeKind :: Void |
288
290
TypeKind :: NullPtr |
291
+ TypeKind :: BlockPointer |
289
292
TypeKind :: Pointer ( ..) => self ,
290
293
291
294
TypeKind :: ResolvedTypeRef ( inner) |
@@ -334,6 +337,8 @@ pub enum TypeKind {
334
337
/// A pointer to a type. The bool field represents whether it's const or
335
338
/// not.
336
339
Pointer ( ItemId ) ,
340
+ /// A pointer to an Apple block.
341
+ BlockPointer ,
337
342
/// A reference to a type, as in: int& foo().
338
343
Reference ( ItemId ) ,
339
344
/// A reference to a template, with different template parameter names. To
@@ -376,6 +381,7 @@ impl Type {
376
381
TypeKind :: Enum ( ..) |
377
382
TypeKind :: Reference ( ..) |
378
383
TypeKind :: NullPtr |
384
+ TypeKind :: BlockPointer |
379
385
TypeKind :: Pointer ( ..) => false ,
380
386
381
387
TypeKind :: UnresolvedTypeRef ( ..)
@@ -485,13 +491,15 @@ impl Type {
485
491
// We might need to, though, if the context is already in the
486
492
// process of resolving them.
487
493
CXType_MemberPointer |
488
- CXType_BlockPointer |
489
494
CXType_Pointer => {
490
495
let inner =
491
496
Item :: from_ty_or_ref ( ty. pointee_type ( ) , location,
492
497
parent_id, ctx) ;
493
498
TypeKind :: Pointer ( inner)
494
499
}
500
+ CXType_BlockPointer => {
501
+ TypeKind :: BlockPointer
502
+ }
495
503
// XXX: RValueReference is most likely wrong, but I don't think we
496
504
// can even add bindings for that, so huh.
497
505
CXType_RValueReference |
0 commit comments