Implement reflection support for Symbolic Extended Existential types.

This patch adds a new SymbolicExtendedExistentialTypeRef kind, and
wires it up in TypeDecoder, TypeRefBuilder, TypeLowering, and
ASTDemangler.

This is tested indirectly via the matching LLDB commit.
This commit is contained in:
Adrian Prantl
2025-08-01 13:51:22 -07:00
parent 10345d3ad0
commit eabcf41a54
11 changed files with 401 additions and 131 deletions

View File

@@ -193,6 +193,7 @@ public:
};
using IndexType = uint64_t;
using RemoteAddressType = std::pair<uint64_t, uint8_t>;
friend class NodeFactory;
@@ -209,14 +210,20 @@ private:
IndexType Index;
NodePointer InlineChildren[2];
NodeVector Children;
RemoteAddressType RemoteAddress;
};
Kind NodeKind;
enum class PayloadKind : uint8_t {
None = 0, OneChild = 1, TwoChildren = 2,
Text, Index, ManyChildren
None = 0,
OneChild = 1,
TwoChildren = 2,
Text,
Index,
ManyChildren,
RemoteAddress
};
PayloadKind NodePayloadKind;
@@ -231,6 +238,10 @@ private:
: NodeKind(k), NodePayloadKind(PayloadKind::Index) {
Index = index;
}
Node(Kind k, uint64_t remoteAddress, uint8_t addressSpace)
: NodeKind(k), NodePayloadKind(PayloadKind::RemoteAddress) {
RemoteAddress = {remoteAddress, addressSpace};
}
Node(const Node &) = delete;
Node &operator=(const Node &) = delete;
@@ -284,6 +295,14 @@ public:
return Index;
}
bool hasRemoteAddress() const {
return NodePayloadKind == PayloadKind::RemoteAddress;
}
std::pair<uint64_t, uint8_t> getRemoteAddress() const {
assert(hasRemoteAddress());
return RemoteAddress;
}
using iterator = const NodePointer *;
size_t getNumChildren() const {