File tree Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -219,24 +219,9 @@ class ReflectionContext
219219 for (unsigned I = 0 ; I < NumSect; ++I) {
220220 auto S = reinterpret_cast <typename T::Section *>(
221221 SectionsBuf + (I * sizeof (typename T::Section)));
222- if (strncmp (S->sectname , Name.data (), strlen (Name. data () )) != 0 )
222+ if (strncmp (S->sectname , Name.data (), sizeof (S-> sectname )) != 0 )
223223 continue ;
224224
225- // The above check verifies that `Name` is a prefix to the examined
226- // section name, to allow for matching of sections with a suffix
227- // like `_TEXT`, etc.
228- // "__swift5_proto" section name is a substring of "__swift5_protos",
229- // Ensure we don't return the latter when looking for the former.
230- SwiftObjectFileFormatMachO ObjectFileFormat;
231- if (Name.data () ==
232- ObjectFileFormat.getSectionName (ReflectionSectionKind::conform)) {
233- auto protocolsSectionName =
234- ObjectFileFormat.getSectionName (ReflectionSectionKind::protocs);
235- if (strncmp (S->sectname , protocolsSectionName.data (),
236- strlen (protocolsSectionName.data ())) == 0 )
237- continue ;
238- }
239-
240225 auto RemoteSecStart = S->addr + Slide;
241226 auto LocalSectBuf =
242227 this ->getReader ().readBytes (RemoteAddress (RemoteSecStart), S->size );
You can’t perform that action at this time.
0 commit comments