[Lldb-commits] [PATCH] D14085: Make Socket to support plugin interface

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 26 12:52:37 PDT 2015


zturner added a comment.

I still think implementation should be in Host as well.  If the idea is to simplify the creation scheme, then you could create an enum:

  enum class SocketType {
      Tcp,
      Udp,
      UnixDomain
  };

and provide a static method on SocketBase like this:

  class SocketBase {
  public:
      static std::unique_ptr<SocketBase>
      MakeSocket(SocketType type);
  };

Although this is in the long term, eventually we will require a modules build of LLDB, so introducing more circular library dependencies should really be avoided, as they are incompatible with modules build and will have to be refactored again once we try to get a modules build working.

Let's see what Greg and others say, but personally I don't think the plugin system should be used solely to gain access to a factory-like creation interface.


http://reviews.llvm.org/D14085





More information about the lldb-commits mailing list