[test] Adjust api-digester/dump-module.swift
for rebranch
#84193
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The API digester queries the top-level declarations for the Swift module
cake
. The first file in that module is aClangModuleUnit
, so we proceed to import that file into Swift. The clang importer fetches the lookup table, then looks up and imports everything in it.rebranch:
__Int64x2_t
, a new "neon vector type". These are not built-in types, but neither are they declared anywhere. You express them using an attribute combined with an integral type, e.g.__attribute__((neon_vector_type(8))) int8_t
. For whatever reason, these types are for AArch64 only, which explains why we don't see the test failure on x86 runners.SwiftTypeConverter::VisitVectorType
, where we useNominalTypeDecl::lookupConformance
to verify that the vector type's element type (imported asInt
in this case) conforms toSIMDScalar
.Int
yet, and the standard library happens to come beforecake
in the list of module loaders, extensions fromcake
are added last.main:
Int
's conformances during importation ofcake.h
.cake.swift
. In the process of deserializing the AST for that file, we encounterInt
extensions and add them to the nominal.Eventually, while processing the collected top-level declarations, the API digester calls
getAllConformances
onInt
, and we see a difference in the index ofP1
between main and rebranch because conformances from extensions are added to the table in the order those extensions were added to the nominal.