mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
swift-reflection-test: Increase reading robustness
- Check return values from `read` - Make the reflstr section optional, as it can be stripped by -strip-reflection-names.
This commit is contained in:
@@ -564,6 +564,8 @@ public:
|
||||
for (auto Info : ReflectionInfos) {
|
||||
for (auto &FieldDescriptor : Info.fieldmd) {
|
||||
auto CandidateMangledName = FieldDescriptor.MangledTypeName.get();
|
||||
if (!CandidateMangledName)
|
||||
continue;
|
||||
if (MangledName.compare(CandidateMangledName) != 0)
|
||||
continue;
|
||||
for (auto &Field : FieldDescriptor) {
|
||||
|
||||
Reference in New Issue
Block a user