summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp')
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
index 379ef3dca86..36f95c063b8 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
@@ -522,7 +522,10 @@ bool AppleObjCTrampolineHandler::AppleObjCVTables::RefreshTrampolines(
const ABI *abi = process->GetABI().get();
ClangASTContext *clang_ast_context =
- process->GetTarget().GetScratchClangASTContext();
+ ClangASTContext::GetScratch(process->GetTarget());
+ if (!clang_ast_context)
+ return false;
+
ValueList argument_values;
Value input_value;
CompilerType clang_void_ptr_type =
@@ -802,7 +805,10 @@ AppleObjCTrampolineHandler::SetupDispatchFunction(Thread &thread,
// Next make the runner function for our implementation utility function.
ClangASTContext *clang_ast_context =
- thread.GetProcess()->GetTarget().GetScratchClangASTContext();
+ ClangASTContext::GetScratch(thread.GetProcess()->GetTarget());
+ if (!clang_ast_context)
+ return LLDB_INVALID_ADDRESS;
+
CompilerType clang_void_ptr_type =
clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType();
Status error;
@@ -895,7 +901,10 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(Thread &thread,
TargetSP target_sp(thread.CalculateTarget());
- ClangASTContext *clang_ast_context = target_sp->GetScratchClangASTContext();
+ ClangASTContext *clang_ast_context = ClangASTContext::GetScratch(*target_sp);
+ if (!clang_ast_context)
+ return ret_plan_sp;
+
ValueList argument_values;
Value void_ptr_value;
CompilerType clang_void_ptr_type =
OpenPOWER on IntegriCloud