Skip to content

Commit f5fad1f

Browse files
authored
Merge pull request swiftlang#25629 from apple/revert-25617-pr-0749a889482066e40ee2f5681a4bb0020007fa7f
Revert "[reflection-dump] Teach reflection dump how to dump protocols from the __swift5_protos section of a .o"
2 parents d27175d + 5295ef7 commit f5fad1f

File tree

11 files changed

+146
-426
lines changed

11 files changed

+146
-426
lines changed

include/swift/ABI/Metadata.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ struct External {
124124

125125
template <typename T, bool Nullable = false>
126126
using RelativeIndirectablePointer = int32_t;
127-
127+
128128
template <typename T, bool Nullable = true>
129-
using RelativeDirectPointer = RelativeDirectPointer<T, Nullable>;
129+
using RelativeDirectPointer = int32_t;
130130
};
131131

132132
/// Template for branching on native pointer types versus external ones

include/swift/Reflection/MetadataSourceBuilder.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
#define SWIFT_REFLECTION_METADATASOURCEBUILDER_H
1919

2020
#include "swift/Reflection/MetadataSource.h"
21-
#include <memory>
22-
#include <vector>
2321

2422
namespace swift {
2523
namespace reflection {

include/swift/Reflection/ProtocolConformance.h

Lines changed: 0 additions & 76 deletions
This file was deleted.

include/swift/Reflection/Records.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@
1717
#ifndef SWIFT_REFLECTION_RECORDS_H
1818
#define SWIFT_REFLECTION_RECORDS_H
1919

20-
#include "swift/Basic/LLVM.h"
2120
#include "swift/Basic/RelativePointer.h"
2221
#include "swift/Demangling/Demangle.h"
2322
#include "llvm/ADT/ArrayRef.h"
24-
#include "llvm/ADT/StringRef.h"
2523

2624
namespace swift {
2725

include/swift/Reflection/ReflectionContext.h

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -224,26 +224,27 @@ class ReflectionContext
224224
auto CaptureSec = findMachOSectionByName("__swift5_capture");
225225
auto TypeRefMdSec = findMachOSectionByName("__swift5_typeref");
226226
auto ReflStrMdSec = findMachOSectionByName("__swift5_reflstr");
227-
auto ProtocolSec = findMachOSectionByName("__swift5_protos");
228227

229-
if (FieldMdSec.first == nullptr && AssocTySec.first == nullptr &&
230-
BuiltinTySec.first == nullptr && CaptureSec.first == nullptr &&
231-
TypeRefMdSec.first == nullptr && ReflStrMdSec.first == nullptr &&
232-
ProtocolSec.first == nullptr)
228+
if (FieldMdSec.first == nullptr &&
229+
AssocTySec.first == nullptr &&
230+
BuiltinTySec.first == nullptr &&
231+
CaptureSec.first == nullptr &&
232+
TypeRefMdSec.first == nullptr &&
233+
ReflStrMdSec.first == nullptr)
233234
return false;
234235

235236
auto LocalStartAddress = reinterpret_cast<uint64_t>(SectBuf.get());
236237
auto RemoteStartAddress = static_cast<uint64_t>(RangeStart);
237238

238-
ReflectionInfo info = {{{FieldMdSec.first, FieldMdSec.second}, 0},
239-
{{AssocTySec.first, AssocTySec.second}, 0},
240-
{{BuiltinTySec.first, BuiltinTySec.second}, 0},
241-
{{CaptureSec.first, CaptureSec.second}, 0},
242-
{{TypeRefMdSec.first, TypeRefMdSec.second}, 0},
243-
{{ReflStrMdSec.first, ReflStrMdSec.second}, 0},
244-
{{ProtocolSec.first, ProtocolSec.second}, 0},
245-
LocalStartAddress,
246-
RemoteStartAddress};
239+
ReflectionInfo info = {
240+
{{FieldMdSec.first, FieldMdSec.second}, 0},
241+
{{AssocTySec.first, AssocTySec.second}, 0},
242+
{{BuiltinTySec.first, BuiltinTySec.second}, 0},
243+
{{CaptureSec.first, CaptureSec.second}, 0},
244+
{{TypeRefMdSec.first, TypeRefMdSec.second}, 0},
245+
{{ReflStrMdSec.first, ReflStrMdSec.second}, 0},
246+
LocalStartAddress,
247+
RemoteStartAddress};
247248

248249
this->addReflectionInfo(info);
249250

include/swift/Reflection/ReflectionInfo.h

Lines changed: 0 additions & 145 deletions
This file was deleted.

0 commit comments

Comments
 (0)