diff --git a/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp b/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp index 26e73a7aeaed..3825c0bc09c7 100644 --- a/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp +++ b/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp @@ -53,7 +53,6 @@ template struct jit_descriptor { }; namespace { - enum EnableJITLoaderGDB { eEnableJITLoaderGDBDefault, eEnableJITLoaderGDBOn, @@ -105,6 +104,7 @@ public: g_jitloadergdb_properties[ePropertyEnable].default_uint_value); } }; +} // namespace static PluginProperties &GetGlobalPluginProperties() { static PluginProperties g_settings; @@ -112,8 +112,8 @@ static PluginProperties &GetGlobalPluginProperties() { } template -bool ReadJITEntry(const addr_t from_addr, Process *process, - jit_code_entry *entry) { +static bool ReadJITEntry(const addr_t from_addr, Process *process, + jit_code_entry *entry) { lldbassert(from_addr % sizeof(ptr_t) == 0); ArchSpec::Core core = process->GetTarget().GetArchitecture().GetCore(); @@ -142,8 +142,6 @@ bool ReadJITEntry(const addr_t from_addr, Process *process, return true; } -} // anonymous namespace end - JITLoaderGDB::JITLoaderGDB(lldb_private::Process *process) : JITLoader(process), m_jit_objects(), m_jit_break_id(LLDB_INVALID_BREAK_ID), diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp index 61c9b9f84272..72fc82c3cd80 100644 --- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp +++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp @@ -100,13 +100,13 @@ public: } }; +} // namespace + static PluginProperties &GetGlobalPluginProperties() { static PluginProperties g_settings; return g_settings; } -} // namespace - static bool GetDebugLinkContents(const llvm::object::COFFObjectFile &coff_obj, std::string &gnu_debuglink_file, uint32_t &gnu_debuglink_crc) { diff --git a/lldb/source/Plugins/Platform/QemuUser/PlatformQemuUser.cpp b/lldb/source/Plugins/Platform/QemuUser/PlatformQemuUser.cpp index 7ee92ef76c9c..4ba20117cdb5 100644 --- a/lldb/source/Plugins/Platform/QemuUser/PlatformQemuUser.cpp +++ b/lldb/source/Plugins/Platform/QemuUser/PlatformQemuUser.cpp @@ -23,6 +23,7 @@ using namespace lldb_private; LLDB_PLUGIN_DEFINE(PlatformQemuUser) +namespace { #define LLDB_PROPERTIES_platformqemuuser #include "PlatformQemuUserProperties.inc" @@ -71,6 +72,8 @@ public: } }; +} // namespace + static PluginProperties &GetGlobalProperties() { static PluginProperties g_settings; return g_settings; diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp index 6b9be1e55d4f..88971e8336a1 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp @@ -83,13 +83,13 @@ public: } }; +} // namespace + static PluginProperties &GetGlobalPluginProperties() { static PluginProperties g_settings; return g_settings; } -} // anonymous namespace end - static const lldb::tid_t g_kernel_tid = 1; llvm::StringRef ProcessKDP::GetPluginDescriptionStatic() { diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index ecd9606106ba..ba180cc821e2 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -166,13 +166,13 @@ public: } }; +} // namespace + static PluginProperties &GetGlobalPluginProperties() { static PluginProperties g_settings; return g_settings; } -} // namespace - // TODO Randomly assigning a port is unsafe. We should get an unused // ephemeral port from the kernel and make sure we reserve it before passing it // to debugserver. diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 348b0e579869..06c12454d9fd 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -130,13 +130,13 @@ public: } }; +} // namespace + static PluginProperties &GetGlobalPluginProperties() { static PluginProperties g_settings; return g_settings; } -} // namespace - static const llvm::DWARFDebugLine::LineTable * ParseLLVMLineTable(lldb_private::DWARFContext &context, llvm::DWARFDebugLine &line, dw_offset_t line_offset,