lldb_private namespace usage

Hi all,

I’ve been running into several classes that are declared in the global namespace (i.e. not within lldb_private or lldb). One such example would be source/Plugins/Process/Linux/LinuxSignals.h.

Is our intent to have all non-public API to be declared within lldb_private? (I would guess so, but wanted to ask in case there was something else at play here). What I wouldn’t expect is for classes to exist in the global namespace.

Thanks!

Either that or if they are just for use within a single file they can be declared in the anonymous namespace.

Jim

Anonymous namespace is good for classes that are local to the implementation file. Otherwise we should use a namespace for each plugin.

We have a few ways we can go with namespaces within plugins:

namespace lldb_plugin {
  namespace process {
    namespace linux {
}}}

Or just omit the lldb_plugin and combine the type of plugin "process" with the plug-in name "linux":

namespace process_linux {
}

Again, only use namespaces for each plug-in if the file has a .h and .cpp.

Great, thanks guys.