mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add a callback to swift::reflection::MemoryReader that allows LLDB to provide
swift::reflection::TypeInfo for (Clang-)imported non-Objective-C types. This is needed to reflect on the size mixed Swift / Clang types, when no type metadata is available for the C types. This is a necessary ingredient for the TypeRef-based Swift context in LLDB. Because we do not have reflection metadata for pure C types in Swift, reflection cannot compute TypeInfo for NominalTypeRefs for those types. By providing this callback, LLDB can supply this information for DWARF, and reflection can compute TypeInfos for mixed Swift/C types.
This commit is contained in:
@@ -37,7 +37,8 @@ namespace remote {
|
||||
class MemoryReader {
|
||||
public:
|
||||
/// A convenient name for the return type from readBytes.
|
||||
using ReadBytesResult = std::unique_ptr<const void, std::function<void(const void *)>>;
|
||||
using ReadBytesResult =
|
||||
std::unique_ptr<const void, std::function<void(const void *)>>;
|
||||
|
||||
virtual bool queryDataLayout(DataLayoutQueryType type, void *inBuffer,
|
||||
void *outBuffer) = 0;
|
||||
@@ -152,9 +153,8 @@ public:
|
||||
|
||||
return resolvePointer(address, pointerData);
|
||||
}
|
||||
|
||||
|
||||
// Parse extra inhabitants stored in a pointer.
|
||||
// Parse extra inhabitants stored in a pointer.
|
||||
// Sets *extraInhabitant to -1 if the pointer at this address
|
||||
// is actually a valid pointer.
|
||||
// Otherwise, it sets *extraInhabitant to the inhabitant
|
||||
|
||||
Reference in New Issue
Block a user