projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f611fcf
)
<rdar://problem/12406088> Fixing a crasher with adding a regex command, due to access...
author
Enrico Granata
<egranata@apple.com>
Mon, 1 Oct 2012 17:19:37 +0000
(17:19 +0000)
committer
Enrico Granata
<egranata@apple.com>
Mon, 1 Oct 2012 17:19:37 +0000
(17:19 +0000)
llvm-svn: 164950
lldb/source/Interpreter/CommandInterpreter.cpp
patch
|
blob
|
history
diff --git
a/lldb/source/Interpreter/CommandInterpreter.cpp
b/lldb/source/Interpreter/CommandInterpreter.cpp
index
eed4038
..
44ba511
100644
(file)
--- a/
lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/
lldb/source/Interpreter/CommandInterpreter.cpp
@@
-624,12
+624,10
@@
CommandInterpreter::AddCommand (const char *name, const lldb::CommandObjectSP &c
if (name && name[0])
{
std::string name_sstr(name);
- if (!can_replace)
- {
- if (m_command_dict.find (name_sstr) != m_command_dict.end())
- return false;
- }
- if (m_command_dict[name_sstr]->IsRemovable() == false)
+ bool found = (m_command_dict.find (name_sstr) != m_command_dict.end());
+ if (found && !can_replace)
+ return false;
+ if (found && m_command_dict[name_sstr]->IsRemovable() == false)
return false;
m_command_dict[name_sstr] = cmd_sp;
return true;