mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[serialization] Handle cross-module references to values in extensions.
Previously, cross-references used a simple access path to refer to values in other modules, but extensions have no name. They also accidentally picked up values in extensions anyway, because lookupDirect includes members in extensions. Now, we filter out values that don't come from the referenced module, which may not be the same module the base type comes from. Swift SVN r6301
This commit is contained in:
@@ -72,9 +72,10 @@ using AbstractCCField = BCFixed<2>;
|
||||
// VERSION_MAJOR.
|
||||
enum XRefKind : uint8_t {
|
||||
SwiftValue = 0,
|
||||
SwiftExtensionValue,
|
||||
SwiftOperator
|
||||
};
|
||||
using XRefKindField = BCFixed<1>;
|
||||
using XRefKindField = BCFixed<2>;
|
||||
|
||||
// These IDs must \em not be renumbered or reordered without incrementing
|
||||
// VERSION_MAJOR.
|
||||
@@ -637,7 +638,9 @@ namespace decls_block {
|
||||
XREF,
|
||||
XRefKindField, // reference kind
|
||||
TypeIDField, // type if value, operator kind if operator
|
||||
BCArray<IdentifierIDField> // access path
|
||||
BCArray<IdentifierIDField> // extension module name (if extension value)
|
||||
// base module name
|
||||
// access path
|
||||
>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user