diff options
| author | Rui Ueyama <ruiu@google.com> | 2017-03-30 20:31:19 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2017-03-30 20:31:19 +0000 |
| commit | 66611d94ad0067eb31c6c4b0ebe84110ec541b13 (patch) | |
| tree | c018d373b7f1f213f516775f0518ec0ef6a256d4 | |
| parent | 3eef2b5e96fd446bd6bf0341bb8cb26be47366e3 (diff) | |
| download | bcm5719-llvm-66611d94ad0067eb31c6c4b0ebe84110ec541b13.tar.gz bcm5719-llvm-66611d94ad0067eb31c6c4b0ebe84110ec541b13.zip | |
Do not enclose an entire file with namespaces.
This change is to improve consistency with other files.
llvm-svn: 299110
| -rw-r--r-- | lld/ELF/Relocations.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp index 2098de5dfee..51b2cafa987 100644 --- a/lld/ELF/Relocations.cpp +++ b/lld/ELF/Relocations.cpp @@ -60,8 +60,8 @@ using namespace llvm::ELF; using namespace llvm::object; using namespace llvm::support::endian; -namespace lld { -namespace elf { +using namespace lld; +using namespace lld::elf; static bool refersToGotEntry(RelExpr Expr) { return isRelExprOneOf<R_GOT, R_GOT_OFF, R_MIPS_GOT_LOCAL_PAGE, R_MIPS_GOT_OFF, @@ -904,7 +904,7 @@ static void scanRelocs(InputSectionBase &Sec, ArrayRef<RelTy> Rels) { } } -template <class ELFT> void scanRelocations(InputSectionBase &S) { +template <class ELFT> void elf::scanRelocations(InputSectionBase &S) { if (S.AreRelocsRela) scanRelocs<ELFT>(S, S.relas<ELFT>()); else @@ -955,7 +955,7 @@ static void mergeThunks(OutputSection *OS, // FIXME: All Thunks are assumed to be in range of the relocation. Range // extension Thunks are not yet supported. template <class ELFT> -bool createThunks(ArrayRef<OutputSection *> OutputSections) { +bool elf::createThunks(ArrayRef<OutputSection *> OutputSections) { // Track Symbols that already have a Thunk DenseMap<SymbolBody *, Thunk *> ThunkedSymbols; // Track InputSections that have a ThunkSection placed in front @@ -1039,14 +1039,12 @@ bool createThunks(ArrayRef<OutputSection *> OutputSections) { return !ThunkSections.empty(); } -template void scanRelocations<ELF32LE>(InputSectionBase &); -template void scanRelocations<ELF32BE>(InputSectionBase &); -template void scanRelocations<ELF64LE>(InputSectionBase &); -template void scanRelocations<ELF64BE>(InputSectionBase &); +template void elf::scanRelocations<ELF32LE>(InputSectionBase &); +template void elf::scanRelocations<ELF32BE>(InputSectionBase &); +template void elf::scanRelocations<ELF64LE>(InputSectionBase &); +template void elf::scanRelocations<ELF64BE>(InputSectionBase &); -template bool createThunks<ELF32LE>(ArrayRef<OutputSection *>); -template bool createThunks<ELF32BE>(ArrayRef<OutputSection *>); -template bool createThunks<ELF64LE>(ArrayRef<OutputSection *>); -template bool createThunks<ELF64BE>(ArrayRef<OutputSection *>); -} -} +template bool elf::createThunks<ELF32LE>(ArrayRef<OutputSection *>); +template bool elf::createThunks<ELF32BE>(ArrayRef<OutputSection *>); +template bool elf::createThunks<ELF64LE>(ArrayRef<OutputSection *>); +template bool elf::createThunks<ELF64BE>(ArrayRef<OutputSection *>); |

