forked from OSchip/llvm-project
[ELF] De-template getErrorPlace. NFC
This commit is contained in:
parent
524545317c
commit
8d8fce87bb
|
@ -91,7 +91,7 @@ TargetInfo *elf::getTarget() {
|
|||
llvm_unreachable("unknown target machine");
|
||||
}
|
||||
|
||||
template <class ELFT> static ErrorPlace getErrPlace(const uint8_t *loc) {
|
||||
ErrorPlace elf::getErrorPlace(const uint8_t *loc) {
|
||||
assert(loc != nullptr);
|
||||
for (InputSectionBase *d : inputSections) {
|
||||
auto *isec = cast<InputSection>(d);
|
||||
|
@ -118,21 +118,6 @@ template <class ELFT> static ErrorPlace getErrPlace(const uint8_t *loc) {
|
|||
return {};
|
||||
}
|
||||
|
||||
ErrorPlace elf::getErrorPlace(const uint8_t *loc) {
|
||||
switch (config->ekind) {
|
||||
case ELF32LEKind:
|
||||
return getErrPlace<ELF32LE>(loc);
|
||||
case ELF32BEKind:
|
||||
return getErrPlace<ELF32BE>(loc);
|
||||
case ELF64LEKind:
|
||||
return getErrPlace<ELF64LE>(loc);
|
||||
case ELF64BEKind:
|
||||
return getErrPlace<ELF64BE>(loc);
|
||||
default:
|
||||
llvm_unreachable("unknown ELF type");
|
||||
}
|
||||
}
|
||||
|
||||
TargetInfo::~TargetInfo() {}
|
||||
|
||||
int64_t TargetInfo::getImplicitAddend(const uint8_t *buf, RelType type) const {
|
||||
|
|
Loading…
Reference in New Issue