forked from OSchip/llvm-project
When a REPL creates a new target for itself, it is that target's REPL.
To allow that, I've added a SetREPL call to the Target, which allows a REPL that just created a target to install itself as the go-to REPL for the corresponding language. llvm-svn: 250870
This commit is contained in:
parent
3b682de6b1
commit
9a6940cef4
|
@ -1569,6 +1569,9 @@ public:
|
|||
|
||||
lldb::REPLSP
|
||||
GetREPL (Error &err, lldb::LanguageType language, const char *repl_options, bool can_create);
|
||||
|
||||
void
|
||||
SetREPL (lldb::LanguageType language, lldb::REPLSP repl_sp);
|
||||
|
||||
protected:
|
||||
//------------------------------------------------------------------
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
#include "lldb/Target/SystemRuntime.h"
|
||||
#include "lldb/Target/Thread.h"
|
||||
#include "lldb/Target/ThreadSpec.h"
|
||||
#include "lldb/Utility/LLDBAssert.h"
|
||||
|
||||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
@ -250,6 +251,14 @@ Target::GetREPL (Error &err, lldb::LanguageType language, const char *repl_optio
|
|||
return lldb::REPLSP();
|
||||
}
|
||||
|
||||
void
|
||||
Target::SetREPL (lldb::LanguageType language, lldb::REPLSP repl_sp)
|
||||
{
|
||||
lldbassert(!m_repl_map.count(language));
|
||||
|
||||
m_repl_map[language] = repl_sp;
|
||||
}
|
||||
|
||||
void
|
||||
Target::Destroy()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue