summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-mi/MICmdCmdGdbSet.cpp
diff options
context:
space:
mode:
authorBruce Mitchener <bruce.mitchener@gmail.com>2015-09-15 12:00:08 +0000
committerBruce Mitchener <bruce.mitchener@gmail.com>2015-09-15 12:00:08 +0000
commit7dd8c12d847ba578b8783dc883611a7df13c5d68 (patch)
tree9229409d2747b57b8fbe98eaf5eca44c6891d7f4 /lldb/tools/lldb-mi/MICmdCmdGdbSet.cpp
parent9c8453fb4b44435d25dbc2d35293a600fc107fb1 (diff)
downloadbcm5719-llvm-7dd8c12d847ba578b8783dc883611a7df13c5d68.tar.gz
bcm5719-llvm-7dd8c12d847ba578b8783dc883611a7df13c5d68.zip
[lldb-mi] Clean up CMICmdArgSet usage.
Summary: 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. Reviewers: abidh, ki.stfu, domipheus Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12878 llvm-svn: 247677
Diffstat (limited to 'lldb/tools/lldb-mi/MICmdCmdGdbSet.cpp')
-rw-r--r--lldb/tools/lldb-mi/MICmdCmdGdbSet.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/tools/lldb-mi/MICmdCmdGdbSet.cpp b/lldb/tools/lldb-mi/MICmdCmdGdbSet.cpp
index a0e23a831ea..b2086fb17e3 100644
--- a/lldb/tools/lldb-mi/MICmdCmdGdbSet.cpp
+++ b/lldb/tools/lldb-mi/MICmdCmdGdbSet.cpp
@@ -73,9 +73,9 @@ bool
CMICmdCmdGdbSet::ParseArgs()
{
m_setCmdArgs.Add(
- *(new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
+ new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1));
m_setCmdArgs.Add(
- *(new CMICmdArgValListOfN(m_constStrArgNamedGdbOption, true, true, CMICmdArgValListBase::eArgValType_StringAnything)));
+ new CMICmdArgValListOfN(m_constStrArgNamedGdbOption, true, true, CMICmdArgValListBase::eArgValType_StringAnything));
return ParseValidateCmdOptions();
}
OpenPOWER on IntegriCloud