@@ -28,7 +28,7 @@ void MachOReader::readHeader(Object &O) const {
28
28
}
29
29
30
30
template <typename SectionType>
31
- static Section constructSectionCommon (SectionType Sec, uint32_t Index) {
31
+ static Section constructSectionCommon (const SectionType & Sec, uint32_t Index) {
32
32
StringRef SegName (Sec.segname , strnlen (Sec.segname , sizeof (Sec.segname )));
33
33
StringRef SectName (Sec.sectname , strnlen (Sec.sectname , sizeof (Sec.sectname )));
34
34
Section S (SegName, SectName);
@@ -46,14 +46,11 @@ static Section constructSectionCommon(SectionType Sec, uint32_t Index) {
46
46
return S;
47
47
}
48
48
49
- template <typename SectionType>
50
- Section constructSection (SectionType Sec, uint32_t Index);
51
-
52
- template <> Section constructSection (MachO::section Sec, uint32_t Index) {
49
+ static Section constructSection (const MachO::section &Sec, uint32_t Index) {
53
50
return constructSectionCommon (Sec, Index);
54
51
}
55
52
56
- template <> Section constructSection (MachO::section_64 Sec, uint32_t Index) {
53
+ static Section constructSection (const MachO::section_64 & Sec, uint32_t Index) {
57
54
Section S = constructSectionCommon (Sec, Index);
58
55
S.Reserved3 = Sec.reserved3 ;
59
56
return S;
0 commit comments