Commit Graph

6 Commits

Author SHA1 Message Date
Doug Gregor
9d74b1d661 Swift lookup tables: translate DeclContext into something less tied to the AST.
We want to serialize this data structure, so make that easier.
2015-12-04 17:05:05 -08:00
Doug Gregor
2244cb4fc8 Swift lookup tables: start testing and cleaning up handling for Objective-C.
Start testing the construction of the Swift lookup tables in the Clang
importer for Objective-C entities. Fix some obvious issues, e.g.,
category and extension entries should be associated with the
corresponding class, and the categories/extensions shouldn't have
entries in the lookup table.
2015-12-03 11:50:41 -08:00
Doug Gregor
c41535a7fb Clang importer: start computing the effective lookup context with the name.
This places enumerators that will become either cases of a Swift enum
or options in a Swift option into the context of the C enum type for
the name lookup table.
2015-12-03 11:50:40 -08:00
Doug Gregor
28dea3bc27 Clang importer: recursively add members to the Swift lookup tables.
This is needed for member lookup via the Swift lookup tables, although
the lookup part is not yet implemented. Note also that the results are
currently wrong for C enumerations mapped into Swift enums or option
sets. That will come shortly.
2015-12-03 11:50:40 -08:00
Doug Gregor
2dc262f5b0 Clang importer: Don't add duplicate declarations to the Swift lookup tables. 2015-12-03 11:50:40 -08:00
Doug Gregor
c2bf16c0a9 Clang importer: start building a Swift name -> Clang declarations table.
When we parse a bridging header, start building a mapping from Swift
names (both base names and full names) to the Clang declarations that
have those names in particular Clang contexts. For now, just provide
the ability to build the table (barely) and dump it out; we'll grow
it's contents in time.
2015-12-03 11:50:39 -08:00