diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp index f0e7ebfc64df0..7bc5121eabe4a 100644 --- a/lld/ELF/Target.cpp +++ b/lld/ELF/Target.cpp @@ -91,7 +91,7 @@ TargetInfo *elf::getTarget() { llvm_unreachable("unknown target machine"); } -template static ErrorPlace getErrPlace(const uint8_t *loc) { +ErrorPlace elf::getErrorPlace(const uint8_t *loc) { assert(loc != nullptr); for (InputSectionBase *d : inputSections) { auto *isec = cast(d); @@ -118,21 +118,6 @@ template static ErrorPlace getErrPlace(const uint8_t *loc) { return {}; } -ErrorPlace elf::getErrorPlace(const uint8_t *loc) { - switch (config->ekind) { - case ELF32LEKind: - return getErrPlace(loc); - case ELF32BEKind: - return getErrPlace(loc); - case ELF64LEKind: - return getErrPlace(loc); - case ELF64BEKind: - return getErrPlace(loc); - default: - llvm_unreachable("unknown ELF type"); - } -} - TargetInfo::~TargetInfo() {} int64_t TargetInfo::getImplicitAddend(const uint8_t *buf, RelType type) const {