[lldb] Cleanup CommandObject registration (NFC)
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 22 Jul 2020 16:51:24 +0000 (09:51 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 22 Jul 2020 16:52:20 +0000 (09:52 -0700)
commit2419ded61d977c043be945f004e6324812a5a3e2
tree7ffd85e0060abc0dded6e1ffbede888f37c13dd4
parent0788ba0066b28cd572b7422b813158b8c01f869c
[lldb] Cleanup CommandObject registration (NFC)

 - Remove the spurious argument to `CommandObjectScript`.
 - Use make_shared instead of bare `new`.
 - Move code duplication behind a macro.

Differential revision: https://reviews.llvm.org/D84336
lldb/source/Interpreter/CommandInterpreter.cpp
lldb/source/Interpreter/CommandObjectScript.cpp
lldb/source/Interpreter/CommandObjectScript.h