summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp')
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp
index a82394592c4..02c0ad5013e 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp
@@ -74,11 +74,16 @@ ClangFunctionCaller::~ClangFunctionCaller()
}
unsigned
-ClangFunctionCaller::CompileFunction(DiagnosticManager &diagnostic_manager)
+
+ClangFunctionCaller::CompileFunction (lldb::ThreadSP thread_to_use_sp,
+ DiagnosticManager &diagnostic_manager)
{
if (m_compiled)
return 0;
+ // Compilation might call code, make sure to keep on the thread the caller indicated.
+ ThreadList::ExpressionExecutionThreadPusher execution_thread_pusher(thread_to_use_sp);
+
// FIXME: How does clang tell us there's no return value? We need to handle that case.
unsigned num_errors = 0;
OpenPOWER on IntegriCloud