ELF2: Rename ElfKind -> EKind.

ELFKind as a type name and ElfKind is a variable name was too subtle.

llvm-svn: 250172
This commit is contained in:
Rui Ueyama 2015-10-13 16:20:50 +00:00
parent 7b94893cec
commit e717a7195b
4 changed files with 6 additions and 7 deletions

View File

@ -55,7 +55,7 @@ struct Configuration {
bool Static = false;
bool Verbose;
bool ZNow = false;
ELFKind ElfKind = ELFNoneKind;
ELFKind EKind = ELFNoneKind;
uint16_t EMachine = llvm::ELF::EM_NONE;
};

View File

@ -101,7 +101,7 @@ void LinkerDriver::main(ArrayRef<const char *> ArgsArr) {
opt::InputArgList Args = parseArgs(&Alloc, ArgsArr);
createFiles(Args);
switch (Config->ElfKind) {
switch (Config->EKind) {
case ELF32LEKind:
link<ELF32LE>(Args);
return;
@ -131,7 +131,7 @@ void LinkerDriver::createFiles(opt::InputArgList &Args) {
if (auto *Arg = Args.getLastArg(OPT_m)) {
std::pair<ELFKind, uint16_t> P = parseEmulation(Arg->getValue());
Config->ElfKind = P.first;
Config->EKind = P.first;
Config->EMachine = P.second;
}

View File

@ -319,8 +319,8 @@ static std::unique_ptr<InputFile> createELFFileAux(MemoryBufferRef MB) {
if (!Config->FirstElf)
Config->FirstElf = Ret.get();
if (Config->ElfKind == ELFNoneKind) {
Config->ElfKind = Ret->getELFKind();
if (Config->EKind == ELFNoneKind) {
Config->EKind = Ret->getELFKind();
Config->EMachine = Ret->getEMachine();
}

View File

@ -211,8 +211,7 @@ void SymbolTable<ELFT>::checkCompatibility(std::unique_ptr<InputFile> &File) {
auto *E = dyn_cast<ELFFileBase<ELFT>>(File.get());
if (!E)
return;
if (E->getELFKind() == Config->ElfKind &&
E->getEMachine() == Config->EMachine)
if (E->getELFKind() == Config->EKind && E->getEMachine() == Config->EMachine)
return;
StringRef A = E->getName();
StringRef B = Config->Emulation;