Commit Graph

7 Commits

Author SHA1 Message Date
Ben Barham
226ba82525 [ClangImporter] Add various const
`getSelector` now takes a `const clang::IdentifierInfo *` `ArrayRef`.
Sprinkle a bunch of `const`s in.
2024-07-02 16:13:49 -07:00
Yeoul Na
ffa8bd514c [ClangImporter] Fix up for CountAttributedType and TypeCoupledDeclRefInfo handlers
CountAttributedType and TypeCoupledDeclRefInfo are new Clang type
and type metadata created for types with the 'counted_by' attribute
that shouldn't be accessible from Swift right now. Hence, marking
them unreachable.
2024-04-30 16:10:52 -07:00
Ben Barham
d2ac8337ed [ClangImporter] Handle new TypeCoupledDeclRefInfo
Add corresponding `readTypeCoupledDeclRefInfo` and `writeTypeCoupledDeclRefInfo`.
2024-04-08 08:58:59 -07:00
Ben Barham
b33055038e [ClangImporter] Add readDeclAs reader implementation 2024-04-08 08:58:58 -07:00
Ben Barham
ff42c48db4 [next] Handle new BTFTagAttributedType
Introduced in llvm/llvm-project
3251ba2d0fcf5223fce3e270b91c54f548664b4e.
2022-05-05 16:25:10 -07:00
Matt Davis
792ee14e0c [clangimporter] Include clang/AST/ASTContext.h to fix master-next build. 2020-04-08 08:41:41 -07:00
John McCall
faee21b626 Implement Swift serialization and deserialization of Clang types.
As part of this, we have to change the type export rules to
prevent `@convention(c)` function types from being used in
exported interfaces if they aren't serializable.  This is a
more conservative version of the original rule I had, which
was to import such function-pointer types as opaque pointers.
That rule would've completely prevented importing function-pointer
types defined in bridging headers and so simply doesn't work,
so we're left trying to catch the unsupportable cases
retroactively.  This has the unfortunate consequence that we
can't necessarily serialize the internal state of the compiler,
but that was already true due to normal type uses of aggregate
types from bridging headers; if we can teach the compiler to
reliably serialize such types, we should be able to use the
same mechanisms for function types.

This PR doesn't flip the switch to use Clang function types
by default, so many of the clang-function-type-serialization
FIXMEs are still in place.
2020-02-06 22:09:00 -05:00