[ELF] De-template BitcodeFile::parse. NFC

This commit is contained in:
Fangrui Song 2022-08-09 21:46:28 -07:00
parent 5990cf3806
commit 596f490ab9
2 changed files with 3 additions and 8 deletions

View File

@ -282,7 +282,7 @@ template <class ELFT> static void doParseFile(InputFile *file) {
// LLVM bitcode file
if (auto *f = dyn_cast<BitcodeFile>(file)) {
ctx->bitcodeFiles.push_back(f);
f->parse<ELFT>();
f->parse();
return;
}
@ -1662,7 +1662,7 @@ createBitcodeSymbol(Symbol *&sym, const std::vector<bool> &keptComdats,
}
}
template <class ELFT> void BitcodeFile::parse() {
void BitcodeFile::parse() {
for (std::pair<StringRef, Comdat::SelectionKind> s : obj->getComdatTable()) {
keptComdats.push_back(
s.second == Comdat::NoDeduplicate ||
@ -1802,11 +1802,6 @@ std::string elf::replaceThinLTOSuffix(StringRef path) {
return std::string(path);
}
template void BitcodeFile::parse<ELF32LE>();
template void BitcodeFile::parse<ELF32BE>();
template void BitcodeFile::parse<ELF64LE>();
template void BitcodeFile::parse<ELF64BE>();
template class elf::ObjFile<ELF32LE>;
template class elf::ObjFile<ELF32BE>;
template class elf::ObjFile<ELF64LE>;

View File

@ -317,7 +317,7 @@ public:
BitcodeFile(MemoryBufferRef m, StringRef archiveName,
uint64_t offsetInArchive, bool lazy);
static bool classof(const InputFile *f) { return f->kind() == BitcodeKind; }
template <class ELFT> void parse();
void parse();
void parseLazy();
void postParse();
std::unique_ptr<llvm::lto::InputFile> obj;