mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
[llvm-objcopy][MachO] Minor code cleanup
Remove unnecessary template in MachOReader.cpp. NFC.
This commit is contained in:
parent
58a44149ab
commit
bb669b7109
@ -28,7 +28,7 @@ void MachOReader::readHeader(Object &O) const {
|
||||
}
|
||||
|
||||
template <typename SectionType>
|
||||
static Section constructSectionCommon(SectionType Sec, uint32_t Index) {
|
||||
static Section constructSectionCommon(const SectionType &Sec, uint32_t Index) {
|
||||
StringRef SegName(Sec.segname, strnlen(Sec.segname, sizeof(Sec.segname)));
|
||||
StringRef SectName(Sec.sectname, strnlen(Sec.sectname, sizeof(Sec.sectname)));
|
||||
Section S(SegName, SectName);
|
||||
@ -46,14 +46,11 @@ static Section constructSectionCommon(SectionType Sec, uint32_t Index) {
|
||||
return S;
|
||||
}
|
||||
|
||||
template <typename SectionType>
|
||||
Section constructSection(SectionType Sec, uint32_t Index);
|
||||
|
||||
template <> Section constructSection(MachO::section Sec, uint32_t Index) {
|
||||
static Section constructSection(const MachO::section &Sec, uint32_t Index) {
|
||||
return constructSectionCommon(Sec, Index);
|
||||
}
|
||||
|
||||
template <> Section constructSection(MachO::section_64 Sec, uint32_t Index) {
|
||||
static Section constructSection(const MachO::section_64 &Sec, uint32_t Index) {
|
||||
Section S = constructSectionCommon(Sec, Index);
|
||||
S.Reserved3 = Sec.reserved3;
|
||||
return S;
|
||||
|
Loading…
x
Reference in New Issue
Block a user