[lldb] Remove some anonymous namespaces
.. and reduce the scope of others. They don't follow llvm coding standards (which say they should be used only when the same effect cannot be achieved with the static keyword), and they set a bad example.
This commit is contained in:
@@ -55,36 +55,36 @@ using namespace llvm::ELF;
|
||||
|
||||
LLDB_PLUGIN_DEFINE(ObjectFileELF)
|
||||
|
||||
namespace {
|
||||
|
||||
// ELF note owner definitions
|
||||
const char *const LLDB_NT_OWNER_FREEBSD = "FreeBSD";
|
||||
const char *const LLDB_NT_OWNER_GNU = "GNU";
|
||||
const char *const LLDB_NT_OWNER_NETBSD = "NetBSD";
|
||||
const char *const LLDB_NT_OWNER_NETBSDCORE = "NetBSD-CORE";
|
||||
const char *const LLDB_NT_OWNER_OPENBSD = "OpenBSD";
|
||||
const char *const LLDB_NT_OWNER_ANDROID = "Android";
|
||||
const char *const LLDB_NT_OWNER_CORE = "CORE";
|
||||
const char *const LLDB_NT_OWNER_LINUX = "LINUX";
|
||||
static const char *const LLDB_NT_OWNER_FREEBSD = "FreeBSD";
|
||||
static const char *const LLDB_NT_OWNER_GNU = "GNU";
|
||||
static const char *const LLDB_NT_OWNER_NETBSD = "NetBSD";
|
||||
static const char *const LLDB_NT_OWNER_NETBSDCORE = "NetBSD-CORE";
|
||||
static const char *const LLDB_NT_OWNER_OPENBSD = "OpenBSD";
|
||||
static const char *const LLDB_NT_OWNER_ANDROID = "Android";
|
||||
static const char *const LLDB_NT_OWNER_CORE = "CORE";
|
||||
static const char *const LLDB_NT_OWNER_LINUX = "LINUX";
|
||||
|
||||
// ELF note type definitions
|
||||
const elf_word LLDB_NT_FREEBSD_ABI_TAG = 0x01;
|
||||
const elf_word LLDB_NT_FREEBSD_ABI_SIZE = 4;
|
||||
static const elf_word LLDB_NT_FREEBSD_ABI_TAG = 0x01;
|
||||
static const elf_word LLDB_NT_FREEBSD_ABI_SIZE = 4;
|
||||
|
||||
const elf_word LLDB_NT_GNU_ABI_TAG = 0x01;
|
||||
const elf_word LLDB_NT_GNU_ABI_SIZE = 16;
|
||||
static const elf_word LLDB_NT_GNU_ABI_TAG = 0x01;
|
||||
static const elf_word LLDB_NT_GNU_ABI_SIZE = 16;
|
||||
|
||||
const elf_word LLDB_NT_GNU_BUILD_ID_TAG = 0x03;
|
||||
static const elf_word LLDB_NT_GNU_BUILD_ID_TAG = 0x03;
|
||||
|
||||
const elf_word LLDB_NT_NETBSD_IDENT_TAG = 1;
|
||||
const elf_word LLDB_NT_NETBSD_IDENT_DESCSZ = 4;
|
||||
const elf_word LLDB_NT_NETBSD_IDENT_NAMESZ = 7;
|
||||
const elf_word LLDB_NT_NETBSD_PROCINFO = 1;
|
||||
static const elf_word LLDB_NT_NETBSD_IDENT_TAG = 1;
|
||||
static const elf_word LLDB_NT_NETBSD_IDENT_DESCSZ = 4;
|
||||
static const elf_word LLDB_NT_NETBSD_IDENT_NAMESZ = 7;
|
||||
static const elf_word LLDB_NT_NETBSD_PROCINFO = 1;
|
||||
|
||||
// GNU ABI note OS constants
|
||||
const elf_word LLDB_NT_GNU_ABI_OS_LINUX = 0x00;
|
||||
const elf_word LLDB_NT_GNU_ABI_OS_HURD = 0x01;
|
||||
const elf_word LLDB_NT_GNU_ABI_OS_SOLARIS = 0x02;
|
||||
static const elf_word LLDB_NT_GNU_ABI_OS_LINUX = 0x00;
|
||||
static const elf_word LLDB_NT_GNU_ABI_OS_HURD = 0x01;
|
||||
static const elf_word LLDB_NT_GNU_ABI_OS_SOLARIS = 0x02;
|
||||
|
||||
namespace {
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
/// \class ELFRelocation
|
||||
@@ -125,6 +125,7 @@ private:
|
||||
|
||||
RelocUnion reloc;
|
||||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
ELFRelocation::ELFRelocation(unsigned type) {
|
||||
if (type == DT_REL || type == SHT_REL)
|
||||
@@ -208,8 +209,6 @@ unsigned ELFRelocation::RelocAddend64(const ELFRelocation &rel) {
|
||||
return rel.reloc.get<ELFRela *>()->r_addend;
|
||||
}
|
||||
|
||||
} // end anonymous namespace
|
||||
|
||||
static user_id_t SegmentID(size_t PHdrIndex) {
|
||||
return ~user_id_t(PHdrIndex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user