[Lldb-commits] [PATCH] D12878: [lldb-mi] Clean up CMICmdArgSet usage.

Bruce Mitchener via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 15 02:22:48 PDT 2015


brucem created this revision.
brucem added reviewers: abidh, ki.stfu, domipheus.
brucem added a subscriber: lldb-commits.

CMICmdArgSet stores a vector of non-const pointers to the arguments
that it is validating. It owns them and is responsible for deleting
them.

We don't need to pass a const reference to the argument to
CMICmdArgSet::Add and then take the address and const_cast it
when we can just pass the argument pointer in directly.

This lets us remove some noise at every call site for CMICmdArgSet::Add
and then clean up a couple of bits inside CMICmdArgSet to remove
const_casts.

http://reviews.llvm.org/D12878

Files:
  tools/lldb-mi/MICmdArgSet.cpp
  tools/lldb-mi/MICmdArgSet.h
  tools/lldb-mi/MICmdCmdBreak.cpp
  tools/lldb-mi/MICmdCmdData.cpp
  tools/lldb-mi/MICmdCmdEnviro.cpp
  tools/lldb-mi/MICmdCmdExec.cpp
  tools/lldb-mi/MICmdCmdFile.cpp
  tools/lldb-mi/MICmdCmdGdbInfo.cpp
  tools/lldb-mi/MICmdCmdGdbSet.cpp
  tools/lldb-mi/MICmdCmdGdbShow.cpp
  tools/lldb-mi/MICmdCmdMiscellanous.cpp
  tools/lldb-mi/MICmdCmdStack.cpp
  tools/lldb-mi/MICmdCmdSupportInfo.cpp
  tools/lldb-mi/MICmdCmdSymbol.cpp
  tools/lldb-mi/MICmdCmdTarget.cpp
  tools/lldb-mi/MICmdCmdThread.cpp
  tools/lldb-mi/MICmdCmdVar.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12878.34790.patch
Type: text/x-patch
Size: 38455 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150915/ac6178e6/attachment-0001.bin>


More information about the lldb-commits mailing list