[lld] r231645 - [Mips] Remove redundant namespace qualifiers
Simon Atanasyan
simon at atanasyan.com
Mon Mar 9 03:54:05 PDT 2015
Author: atanasyan
Date: Mon Mar 9 05:54:05 2015
New Revision: 231645
URL: http://llvm.org/viewvc/llvm-project?rev=231645&view=rev
Log:
[Mips] Remove redundant namespace qualifiers
No functional changes.
Modified:
lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp
lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp
Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp?rev=231645&r1=231644&r2=231645&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp Mon Mar 9 05:54:05 2015
@@ -34,59 +34,59 @@ struct MipsRelocationParams {
static MipsRelocationParams getRelocationParams(uint32_t rType) {
switch (rType) {
- case llvm::ELF::R_MIPS_NONE:
+ case R_MIPS_NONE:
return {4, 0x0, 0, false};
- case llvm::ELF::R_MIPS_64:
- case llvm::ELF::R_MIPS_SUB:
+ case R_MIPS_64:
+ case R_MIPS_SUB:
return {8, 0xffffffffffffffffull, 0, false};
- case llvm::ELF::R_MIPS_32:
- case llvm::ELF::R_MIPS_GPREL32:
- case llvm::ELF::R_MIPS_PC32:
+ case R_MIPS_32:
+ case R_MIPS_GPREL32:
+ case R_MIPS_PC32:
case LLD_R_MIPS_32_HI16:
return {4, 0xffffffff, 0, false};
- case llvm::ELF::R_MIPS_26:
+ case R_MIPS_26:
case LLD_R_MIPS_GLOBAL_26:
return {4, 0x3ffffff, 2, false};
- case llvm::ELF::R_MIPS_HI16:
- case llvm::ELF::R_MIPS_LO16:
- case llvm::ELF::R_MIPS_GPREL16:
- case llvm::ELF::R_MIPS_GOT16:
- case llvm::ELF::R_MIPS_TLS_DTPREL_HI16:
- case llvm::ELF::R_MIPS_TLS_DTPREL_LO16:
- case llvm::ELF::R_MIPS_TLS_TPREL_HI16:
- case llvm::ELF::R_MIPS_TLS_TPREL_LO16:
+ case R_MIPS_HI16:
+ case R_MIPS_LO16:
+ case R_MIPS_GPREL16:
+ case R_MIPS_GOT16:
+ case R_MIPS_TLS_DTPREL_HI16:
+ case R_MIPS_TLS_DTPREL_LO16:
+ case R_MIPS_TLS_TPREL_HI16:
+ case R_MIPS_TLS_TPREL_LO16:
case LLD_R_MIPS_HI16:
case LLD_R_MIPS_LO16:
return {4, 0xffff, 0, false};
- case llvm::ELF::R_MICROMIPS_TLS_DTPREL_HI16:
- case llvm::ELF::R_MICROMIPS_TLS_DTPREL_LO16:
- case llvm::ELF::R_MICROMIPS_TLS_TPREL_HI16:
- case llvm::ELF::R_MICROMIPS_TLS_TPREL_LO16:
+ case R_MICROMIPS_TLS_DTPREL_HI16:
+ case R_MICROMIPS_TLS_DTPREL_LO16:
+ case R_MICROMIPS_TLS_TPREL_HI16:
+ case R_MICROMIPS_TLS_TPREL_LO16:
return {4, 0xffff, 0, true};
- case llvm::ELF::R_MICROMIPS_26_S1:
+ case R_MICROMIPS_26_S1:
case LLD_R_MICROMIPS_GLOBAL_26_S1:
return {4, 0x3ffffff, 1, true};
- case llvm::ELF::R_MICROMIPS_HI16:
- case llvm::ELF::R_MICROMIPS_LO16:
- case llvm::ELF::R_MICROMIPS_GOT16:
+ case R_MICROMIPS_HI16:
+ case R_MICROMIPS_LO16:
+ case R_MICROMIPS_GOT16:
return {4, 0xffff, 0, true};
- case llvm::ELF::R_MICROMIPS_PC16_S1:
+ case R_MICROMIPS_PC16_S1:
return {4, 0xffff, 1, true};
- case llvm::ELF::R_MICROMIPS_PC7_S1:
+ case R_MICROMIPS_PC7_S1:
return {4, 0x7f, 1, false};
- case llvm::ELF::R_MICROMIPS_PC10_S1:
+ case R_MICROMIPS_PC10_S1:
return {4, 0x3ff, 1, false};
- case llvm::ELF::R_MICROMIPS_PC23_S2:
+ case R_MICROMIPS_PC23_S2:
return {4, 0x7fffff, 2, true};
- case llvm::ELF::R_MIPS_CALL16:
- case llvm::ELF::R_MIPS_TLS_GD:
- case llvm::ELF::R_MIPS_TLS_LDM:
- case llvm::ELF::R_MIPS_TLS_GOTTPREL:
+ case R_MIPS_CALL16:
+ case R_MIPS_TLS_GD:
+ case R_MIPS_TLS_LDM:
+ case R_MIPS_TLS_GOTTPREL:
return {4, 0xffff, 0, false};
- case llvm::ELF::R_MICROMIPS_CALL16:
- case llvm::ELF::R_MICROMIPS_TLS_GD:
- case llvm::ELF::R_MICROMIPS_TLS_LDM:
- case llvm::ELF::R_MICROMIPS_TLS_GOTTPREL:
+ case R_MICROMIPS_CALL16:
+ case R_MICROMIPS_TLS_GD:
+ case R_MICROMIPS_TLS_LDM:
+ case R_MICROMIPS_TLS_GOTTPREL:
return {4, 0xffff, 0, true};
case R_MIPS_JALR:
return {4, 0x0, 0, false};
Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp?rev=231645&r1=231644&r2=231645&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp Mon Mar 9 05:54:05 2015
@@ -592,7 +592,7 @@ bool RelocationPass<ELFT>::mightBeDynami
if ((atom.section()->sh_flags & SHF_ALLOC) == 0)
return false;
- if (_ctx.getOutputELFType() == llvm::ELF::ET_DYN)
+ if (_ctx.getOutputELFType() == ET_DYN)
return true;
if (!isMipsReadonly(atom))
return true;
@@ -640,7 +640,7 @@ bool RelocationPass<ELFT>::isDynamic(con
if (sa)
return true;
- if (_ctx.getOutputELFType() == llvm::ELF::ET_DYN) {
+ if (_ctx.getOutputELFType() == ET_DYN) {
if (da && da->scope() != DefinedAtom::scopeTranslationUnit)
return true;
@@ -743,7 +743,7 @@ bool RelocationPass<ELFT>::isLocalCall(c
return true;
// Calls to external symbols defined in an executable file resolved locally.
- if (_ctx.getOutputELFType() == llvm::ELF::ET_EXEC)
+ if (_ctx.getOutputELFType() == ET_EXEC)
return true;
return false;
@@ -960,10 +960,10 @@ static std::unique_ptr<Pass> createPass(
std::unique_ptr<Pass>
lld::elf::createMipsRelocationPass(MipsLinkingContext &ctx) {
switch (ctx.getOutputELFType()) {
- case llvm::ELF::ET_EXEC:
- case llvm::ELF::ET_DYN:
+ case ET_EXEC:
+ case ET_DYN:
return createPass(ctx);
- case llvm::ELF::ET_REL:
+ case ET_REL:
return nullptr;
default:
llvm_unreachable("Unhandled output file type");
More information about the llvm-commits
mailing list