Simplify. NFC.

llvm-svn: 257432
This commit is contained in:
Rui Ueyama 2016-01-12 01:33:23 +00:00
parent 0c0fc25e72
commit 94b08e3bf0
2 changed files with 3 additions and 7 deletions

View File

@ -177,10 +177,9 @@ void LinkerDriver::readConfigs(opt::InputArgList &Args) {
Config->RPath = llvm::join(RPaths.begin(), RPaths.end(), ":");
if (auto *Arg = Args.getLastArg(OPT_m)) {
// Parse ELF{32,64}{LE,BE} and CPU type.
StringRef S = Arg->getValue();
std::pair<ELFKind, uint16_t> P = parseEmulation(S);
Config->EKind = P.first;
Config->EMachine = P.second;
std::tie(Config->EKind, Config->EMachine) = parseEmulation(S);
Config->Emulation = S;
}

View File

@ -98,10 +98,7 @@ private:
};
} // anonymous namespace
template <class ELFT> static bool shouldUseRela() {
ELFKind K = cast<ELFFileBase<ELFT>>(Config->FirstElf)->getELFKind();
return K == ELF64LEKind || K == ELF64BEKind;
}
template <class ELFT> static bool shouldUseRela() { return ELFT::Is64Bits; }
template <class ELFT> void elf2::writeResult(SymbolTable<ELFT> *Symtab) {
// Initialize output sections that are handled by Writer specially.