Compilation can end up calling functions (e.g. to resolve indirect functions) so I added

a way for compilation to take a "thread to use for compilation".  If it isn't set then the
compilation will use the currently selected thread.  This should help keep function execution
to the one thread intended.

llvm-svn: 263972
This commit is contained in:
Jim Ingham
2016-03-21 19:21:13 +00:00
parent cdaf644c48
commit 6896b35585
14 changed files with 52 additions and 14 deletions

View File

@@ -70,7 +70,7 @@ UtilityFunction::~UtilityFunction ()
// FIXME: We should check that every time this is called it is called with the same return type & arguments...
FunctionCaller *
UtilityFunction::MakeFunctionCaller (const CompilerType &return_type, const ValueList &arg_value_list, Error &error)
UtilityFunction::MakeFunctionCaller (const CompilerType &return_type, const ValueList &arg_value_list, lldb::ThreadSP thread_to_use_sp, Error &error)
{
if (m_caller_up)
return m_caller_up.get();
@@ -99,7 +99,7 @@ UtilityFunction::MakeFunctionCaller (const CompilerType &return_type, const Valu
{
DiagnosticManager diagnostics;
unsigned num_errors = m_caller_up->CompileFunction(diagnostics);
unsigned num_errors = m_caller_up->CompileFunction(thread_to_use_sp, diagnostics);
if (num_errors)
{
error.SetErrorStringWithFormat("Error compiling %s caller function: \"%s\".", m_function_name.c_str(),