Skip to content

Commit 8458f10

Browse files
authored
Merge pull request #22150 from DougGregor/remote-ast-extensions
2 parents 587a9a8 + 2a3b237 commit 8458f10

File tree

6 files changed

+521
-69
lines changed

6 files changed

+521
-69
lines changed

include/swift/ABI/Metadata.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,10 +1547,10 @@ class TargetProtocolDescriptorRef {
15471547
/// is clear).
15481548
StoredPointer storage;
15491549

1550+
public:
15501551
constexpr TargetProtocolDescriptorRef(StoredPointer storage)
15511552
: storage(storage) { }
15521553

1553-
public:
15541554
constexpr TargetProtocolDescriptorRef() : storage() { }
15551555

15561556
TargetProtocolDescriptorRef(
@@ -2519,7 +2519,6 @@ class TargetGenericRequirementDescriptor {
25192519
/// The type that's constrained, described as a mangled name.
25202520
RelativeDirectPointer<const char, /*nullable*/ false> Param;
25212521

2522-
private:
25232522
union {
25242523
/// A mangled representation of the same-type or base class the param is
25252524
/// constrained to.
@@ -2544,7 +2543,6 @@ class TargetGenericRequirementDescriptor {
25442543
GenericRequirementLayoutKind Layout;
25452544
};
25462545

2547-
public:
25482546
constexpr GenericRequirementFlags getFlags() const {
25492547
return Flags;
25502548
}
@@ -2784,6 +2782,7 @@ struct TargetExtensionContextDescriptor final
27842782
using TrailingGenericContextObjects
27852783
= TrailingGenericContextObjects<TargetExtensionContextDescriptor<Runtime>>;
27862784

2785+
public:
27872786
/// A mangling of the `Self` type context that the extension extends.
27882787
/// The mangled name represents the type in the generic context encoded by
27892788
/// this descriptor. For example, a nongeneric nominal type extension will
@@ -2794,7 +2793,6 @@ struct TargetExtensionContextDescriptor final
27942793
/// extension is declared inside.
27952794
RelativeDirectPointer<const char> ExtendedContext;
27962795

2797-
public:
27982796
using TrailingGenericContextObjects::getGenericContext;
27992797

28002798
StringRef getMangledExtendedContext() const {

include/swift/Demangling/Demangler.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,13 @@ class Demangler : public NodeFactory {
507507
std::function<SymbolicReferenceResolver_t> resolver) {
508508
SymbolicReferenceResolver = resolver;
509509
}
510-
510+
511+
/// Take the symbolic reference resolver.
512+
std::function<SymbolicReferenceResolver_t> &&
513+
takeSymbolicReferenceResolver() {
514+
return std::move(SymbolicReferenceResolver);
515+
}
516+
511517
/// Demangle the given symbol and return the parse tree.
512518
///
513519
/// \param MangledName The mangled symbol string, which start with the

0 commit comments

Comments
 (0)