Skip to content

Commit 594308c

Browse files
committed
[lldb][NFC] Rename TypeSystemClang::GetScratch to ScratchTypeSystemClang::GetForTarget
Also add some documentation while I'm at it.
1 parent c25b039 commit 594308c

25 files changed

+79
-56
lines changed

lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,7 @@ DynamicLoaderDarwin::GetThreadLocalData(const lldb::ModuleSP module_sp,
11131113
StackFrameSP frame_sp = thread_sp->GetStackFrameAtIndex(0);
11141114
if (frame_sp) {
11151115
TypeSystemClang *clang_ast_context =
1116-
TypeSystemClang::GetScratch(target);
1116+
ScratchTypeSystemClang::GetForTarget(target);
11171117

11181118
if (!clang_ast_context)
11191119
return LLDB_INVALID_ADDRESS;

lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ bool DynamicLoaderMacOS::NotifyBreakpointHit(void *baton,
224224
// get the values from the ABI:
225225

226226
TypeSystemClang *clang_ast_context =
227-
TypeSystemClang::GetScratch(process->GetTarget());
227+
ScratchTypeSystemClang::GetForTarget(process->GetTarget());
228228
if (!clang_ast_context)
229229
return false;
230230

lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ bool DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(
343343
// get the values from the ABI:
344344

345345
TypeSystemClang *clang_ast_context =
346-
TypeSystemClang::GetScratch(process->GetTarget());
346+
ScratchTypeSystemClang::GetForTarget(process->GetTarget());
347347
if (!clang_ast_context)
348348
return false;
349349

lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ void ASTResultSynthesizer::CommitPersistentDecls() {
443443
return;
444444

445445
auto *persistent_vars = llvm::cast<ClangPersistentVariables>(state);
446-
TypeSystemClang *scratch_ctx = TypeSystemClang::GetScratch(m_target);
446+
TypeSystemClang *scratch_ctx = ScratchTypeSystemClang::GetForTarget(m_target);
447447

448448
for (clang::NamedDecl *decl : m_decls) {
449449
StringRef name = decl->getName();

lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ ClangASTSource::~ClangASTSource() {
7575
// demand by passing false to
7676
// Target::GetScratchTypeSystemClang(create_on_demand).
7777
TypeSystemClang *scratch_clang_ast_context =
78-
TypeSystemClang::GetScratch(*m_target, false);
78+
ScratchTypeSystemClang::GetForTarget(*m_target, false);
7979

8080
if (!scratch_clang_ast_context)
8181
return;

lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ bool ClangExpressionDeclMap::WillParse(ExecutionContext &exe_ctx,
110110
m_parser_vars->m_persistent_vars = llvm::cast<ClangPersistentVariables>(
111111
target->GetPersistentExpressionStateForLanguage(eLanguageTypeC));
112112

113-
if (!TypeSystemClang::GetScratch(*target))
113+
if (!ScratchTypeSystemClang::GetForTarget(*target))
114114
return false;
115115
}
116116

@@ -184,7 +184,7 @@ ClangExpressionDeclMap::TargetInfo ClangExpressionDeclMap::GetTargetInfo() {
184184
TypeFromUser ClangExpressionDeclMap::DeportType(TypeSystemClang &target,
185185
TypeSystemClang &source,
186186
TypeFromParser parser_type) {
187-
assert(&target == TypeSystemClang::GetScratch(*m_target));
187+
assert(&target == ScratchTypeSystemClang::GetForTarget(*m_target));
188188
assert((TypeSystem *)&source == parser_type.GetTypeSystem());
189189
assert(&source.getASTContext() == m_ast_context);
190190

@@ -222,7 +222,7 @@ bool ClangExpressionDeclMap::AddPersistentVariable(const NamedDecl *decl,
222222
if (target == nullptr)
223223
return false;
224224

225-
auto *clang_ast_context = TypeSystemClang::GetScratch(*target);
225+
auto *clang_ast_context = ScratchTypeSystemClang::GetForTarget(*target);
226226
if (!clang_ast_context)
227227
return false;
228228

@@ -260,7 +260,7 @@ bool ClangExpressionDeclMap::AddPersistentVariable(const NamedDecl *decl,
260260
if (target == nullptr)
261261
return false;
262262

263-
TypeSystemClang *context = TypeSystemClang::GetScratch(*target);
263+
TypeSystemClang *context = ScratchTypeSystemClang::GetForTarget(*target);
264264
if (!context)
265265
return false;
266266

@@ -721,7 +721,7 @@ clang::NamedDecl *ClangExpressionDeclMap::GetPersistentDecl(ConstString name) {
721721
if (!target)
722722
return nullptr;
723723

724-
TypeSystemClang::GetScratch(*target);
724+
ScratchTypeSystemClang::GetForTarget(*target);
725725

726726
if (!m_parser_vars->m_persistent_vars)
727727
return nullptr;
@@ -1638,7 +1638,8 @@ void ClangExpressionDeclMap::AddOneGenericVariable(NameSearchContext &context,
16381638
if (target == nullptr)
16391639
return;
16401640

1641-
TypeSystemClang *scratch_ast_context = TypeSystemClang::GetScratch(*target);
1641+
TypeSystemClang *scratch_ast_context =
1642+
ScratchTypeSystemClang::GetForTarget(*target);
16421643
if (!scratch_ast_context)
16431644
return;
16441645

lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ bool lldb_private::formatters::LibcxxWStringSummaryProvider(
692692

693693
// std::wstring::size() is measured in 'characters', not bytes
694694
TypeSystemClang *ast_context =
695-
TypeSystemClang::GetScratch(*valobj.GetTargetSP());
695+
ScratchTypeSystemClang::GetForTarget(*valobj.GetTargetSP());
696696
if (!ast_context)
697697
return false;
698698

lldb/source/Plugins/Language/ObjC/NSArray.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ lldb_private::formatters::NSArrayMSyntheticFrontEndBase::NSArrayMSyntheticFrontE
441441
: SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(), m_ptr_size(8),
442442
m_id_type() {
443443
if (valobj_sp) {
444-
auto *clang_ast_context = TypeSystemClang::GetScratch(
444+
auto *clang_ast_context = ScratchTypeSystemClang::GetForTarget(
445445
*valobj_sp->GetExecutionContextRef().GetTargetSP());
446446
if (clang_ast_context)
447447
m_id_type = CompilerType(
@@ -589,7 +589,7 @@ lldb_private::formatters::GenericNSArrayISyntheticFrontEnd<D32, D64, Inline>::
589589
if (valobj_sp) {
590590
CompilerType type = valobj_sp->GetCompilerType();
591591
if (type) {
592-
auto *clang_ast_context = TypeSystemClang::GetScratch(
592+
auto *clang_ast_context = ScratchTypeSystemClang::GetForTarget(
593593
*valobj_sp->GetExecutionContextRef().GetTargetSP());
594594
if (clang_ast_context)
595595
m_id_type = clang_ast_context->GetType(
@@ -758,7 +758,7 @@ lldb_private::formatters::NSArray1SyntheticFrontEnd::GetChildAtIndex(
758758

759759
if (idx == 0) {
760760
auto *clang_ast_context =
761-
TypeSystemClang::GetScratch(*m_backend.GetTargetSP());
761+
ScratchTypeSystemClang::GetForTarget(*m_backend.GetTargetSP());
762762
if (clang_ast_context) {
763763
CompilerType id_type(
764764
clang_ast_context->GetBasicType(lldb::eBasicTypeObjCID));

lldb/source/Plugins/Language/ObjC/NSDictionary.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ NSDictionary_Additionals::GetAdditionalSynthetics() {
6666
static CompilerType GetLLDBNSPairType(TargetSP target_sp) {
6767
CompilerType compiler_type;
6868

69-
TypeSystemClang *target_ast_context = TypeSystemClang::GetScratch(*target_sp);
69+
TypeSystemClang *target_ast_context =
70+
ScratchTypeSystemClang::GetForTarget(*target_sp);
7071

7172
if (target_ast_context) {
7273
ConstString g___lldb_autogen_nspair("__lldb_autogen_nspair");

lldb/source/Plugins/Language/ObjC/NSError.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ bool lldb_private::formatters::NSError_SummaryProvider(
8787
ValueObjectSP domain_str_sp = ValueObject::CreateValueObjectFromData(
8888
"domain_str", isw.GetAsData(process_sp->GetByteOrder()),
8989
valobj.GetExecutionContextRef(),
90-
TypeSystemClang::GetScratch(process_sp->GetTarget())
90+
ScratchTypeSystemClang::GetForTarget(process_sp->GetTarget())
9191
->GetBasicType(lldb::eBasicTypeVoid)
9292
.GetPointerType());
9393

@@ -156,7 +156,7 @@ class NSErrorSyntheticFrontEnd : public SyntheticChildrenFrontEnd {
156156
m_child_sp = CreateValueObjectFromData(
157157
"_userInfo", isw.GetAsData(process_sp->GetByteOrder()),
158158
m_backend.GetExecutionContextRef(),
159-
TypeSystemClang::GetScratch(process_sp->GetTarget())
159+
ScratchTypeSystemClang::GetForTarget(process_sp->GetTarget())
160160
->GetBasicType(lldb::eBasicTypeObjCID));
161161
return false;
162162
}

lldb/source/Plugins/Language/ObjC/NSException.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ static bool ExtractFields(ValueObject &valobj, ValueObjectSP *name_sp,
6969
InferiorSizedWord userinfo_isw(userinfo, *process_sp);
7070
InferiorSizedWord reserved_isw(reserved, *process_sp);
7171

72-
auto *clang_ast_context = TypeSystemClang::GetScratch(process_sp->GetTarget());
72+
auto *clang_ast_context =
73+
ScratchTypeSystemClang::GetForTarget(process_sp->GetTarget());
7374
if (!clang_ast_context)
7475
return false;
7576

lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class NSIndexPathSyntheticFrontEnd : public SyntheticChildrenFrontEnd {
5353
if (!type_system)
5454
return false;
5555

56-
TypeSystemClang *ast = TypeSystemClang::GetScratch(
56+
TypeSystemClang *ast = ScratchTypeSystemClang::GetForTarget(
5757
*m_backend.GetExecutionContextRef().GetTargetSP());
5858
if (!ast)
5959
return false;

lldb/source/Plugins/Language/ObjC/NSString.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ NSString_Additionals::GetAdditionalSummaries() {
3434
static CompilerType GetNSPathStore2Type(Target &target) {
3535
static ConstString g_type_name("__lldb_autogen_nspathstore2");
3636

37-
TypeSystemClang *ast_ctx = TypeSystemClang::GetScratch(target);
37+
TypeSystemClang *ast_ctx = ScratchTypeSystemClang::GetForTarget(target);
3838

3939
if (!ast_ctx)
4040
return CompilerType();

lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ ValueObjectSP ItaniumABILanguageRuntime::GetExceptionObjectForThread(
536536
return {};
537537

538538
TypeSystemClang *clang_ast_context =
539-
TypeSystemClang::GetScratch(m_process->GetTarget());
539+
ScratchTypeSystemClang::GetForTarget(m_process->GetTarget());
540540
if (!clang_ast_context)
541541
return {};
542542

lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ bool AppleObjCRuntime::GetObjectDescription(Stream &strm, Value &value,
122122
}
123123
} else {
124124
// If it is not a pointer, see if we can make it into a pointer.
125-
TypeSystemClang *ast_context = TypeSystemClang::GetScratch(*target);
125+
TypeSystemClang *ast_context =
126+
ScratchTypeSystemClang::GetForTarget(*target);
126127
if (!ast_context)
127128
return false;
128129

@@ -137,7 +138,7 @@ bool AppleObjCRuntime::GetObjectDescription(Stream &strm, Value &value,
137138
arg_value_list.PushValue(value);
138139

139140
// This is the return value:
140-
TypeSystemClang *ast_context = TypeSystemClang::GetScratch(*target);
141+
TypeSystemClang *ast_context = ScratchTypeSystemClang::GetForTarget(*target);
141142
if (!ast_context)
142143
return false;
143144

@@ -525,7 +526,7 @@ ThreadSP AppleObjCRuntime::GetBacktraceThreadFromException(
525526
return FailExceptionParsing("Failed to get synthetic value.");
526527

527528
TypeSystemClang *clang_ast_context =
528-
TypeSystemClang::GetScratch(*exception_sp->GetTargetSP());
529+
ScratchTypeSystemClang::GetForTarget(*exception_sp->GetTargetSP());
529530
if (!clang_ast_context)
530531
return FailExceptionParsing("Failed to get scratch AST.");
531532
CompilerType objc_id =

lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,8 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapDynamic(
13041304
return DescriptorMapUpdateResult::Fail();
13051305

13061306
thread_sp->CalculateExecutionContext(exe_ctx);
1307-
TypeSystemClang *ast = TypeSystemClang::GetScratch(process->GetTarget());
1307+
TypeSystemClang *ast =
1308+
ScratchTypeSystemClang::GetForTarget(process->GetTarget());
13081309

13091310
if (!ast)
13101311
return DescriptorMapUpdateResult::Fail();
@@ -1547,7 +1548,8 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapSharedCache() {
15471548
return DescriptorMapUpdateResult::Fail();
15481549

15491550
thread_sp->CalculateExecutionContext(exe_ctx);
1550-
TypeSystemClang *ast = TypeSystemClang::GetScratch(process->GetTarget());
1551+
TypeSystemClang *ast =
1552+
ScratchTypeSystemClang::GetForTarget(process->GetTarget());
15511553

15521554
if (!ast)
15531555
return DescriptorMapUpdateResult::Fail();
@@ -2609,7 +2611,7 @@ class ObjCExceptionRecognizedStackFrame : public RecognizedStackFrame {
26092611
if (!abi) return;
26102612

26112613
TypeSystemClang *clang_ast_context =
2612-
TypeSystemClang::GetScratch(process_sp->GetTarget());
2614+
ScratchTypeSystemClang::GetForTarget(process_sp->GetTarget());
26132615
if (!clang_ast_context)
26142616
return;
26152617
CompilerType voidstar =

lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ bool AppleObjCTrampolineHandler::AppleObjCVTables::RefreshTrampolines(
521521
const ABI *abi = process->GetABI().get();
522522

523523
TypeSystemClang *clang_ast_context =
524-
TypeSystemClang::GetScratch(process->GetTarget());
524+
ScratchTypeSystemClang::GetForTarget(process->GetTarget());
525525
if (!clang_ast_context)
526526
return false;
527527

@@ -827,8 +827,8 @@ AppleObjCTrampolineHandler::SetupDispatchFunction(Thread &thread,
827827
}
828828

829829
// Next make the runner function for our implementation utility function.
830-
TypeSystemClang *clang_ast_context =
831-
TypeSystemClang::GetScratch(thread.GetProcess()->GetTarget());
830+
TypeSystemClang *clang_ast_context = ScratchTypeSystemClang::GetForTarget(
831+
thread.GetProcess()->GetTarget());
832832
if (!clang_ast_context)
833833
return LLDB_INVALID_ADDRESS;
834834

@@ -931,7 +931,8 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(Thread &thread,
931931

932932
TargetSP target_sp(thread.CalculateTarget());
933933

934-
TypeSystemClang *clang_ast_context = TypeSystemClang::GetScratch(*target_sp);
934+
TypeSystemClang *clang_ast_context =
935+
ScratchTypeSystemClang::GetForTarget(*target_sp);
935936
if (!clang_ast_context)
936937
return ret_plan_sp;
937938

lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,8 @@ PlatformPOSIX::MakeLoadImageUtilityFunction(ExecutionContext &exe_ctx,
651651
FunctionCaller *do_dlopen_function = nullptr;
652652

653653
// Fetch the clang types we will need:
654-
TypeSystemClang *ast = TypeSystemClang::GetScratch(process->GetTarget());
654+
TypeSystemClang *ast =
655+
ScratchTypeSystemClang::GetForTarget(process->GetTarget());
655656
if (!ast)
656657
return nullptr;
657658

@@ -895,7 +896,8 @@ uint32_t PlatformPOSIX::DoLoadImage(lldb_private::Process *process,
895896

896897
Value return_value;
897898
// Fetch the clang types we will need:
898-
TypeSystemClang *ast = TypeSystemClang::GetScratch(process->GetTarget());
899+
TypeSystemClang *ast =
900+
ScratchTypeSystemClang::GetForTarget(process->GetTarget());
899901
if (!ast) {
900902
error.SetErrorString("dlopen error: Unable to get TypeSystemClang");
901903
return LLDB_INVALID_IMAGE_TOKEN;

lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ AppleGetItemInfoHandler::GetItemInfo(Thread &thread, uint64_t item,
216216
lldb::StackFrameSP thread_cur_frame = thread.GetStackFrameAtIndex(0);
217217
ProcessSP process_sp(thread.CalculateProcess());
218218
TargetSP target_sp(thread.CalculateTarget());
219-
TypeSystemClang *clang_ast_context = TypeSystemClang::GetScratch(*target_sp);
219+
TypeSystemClang *clang_ast_context =
220+
ScratchTypeSystemClang::GetForTarget(*target_sp);
220221
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYSTEM_RUNTIME));
221222

222223
GetItemInfoReturnInfo return_value;

lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ lldb::addr_t AppleGetPendingItemsHandler::SetupGetPendingItemsFunction(
163163

164164
// Next make the runner function for our implementation utility function.
165165
Status error;
166-
TypeSystemClang *clang_ast_context =
167-
TypeSystemClang::GetScratch(thread.GetProcess()->GetTarget());
166+
TypeSystemClang *clang_ast_context = ScratchTypeSystemClang::GetForTarget(
167+
thread.GetProcess()->GetTarget());
168168
CompilerType get_pending_items_return_type =
169169
clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType();
170170
get_pending_items_caller =
@@ -215,7 +215,8 @@ AppleGetPendingItemsHandler::GetPendingItems(Thread &thread, addr_t queue,
215215
lldb::StackFrameSP thread_cur_frame = thread.GetStackFrameAtIndex(0);
216216
ProcessSP process_sp(thread.CalculateProcess());
217217
TargetSP target_sp(thread.CalculateTarget());
218-
TypeSystemClang *clang_ast_context = TypeSystemClang::GetScratch(*target_sp);
218+
TypeSystemClang *clang_ast_context =
219+
ScratchTypeSystemClang::GetForTarget(*target_sp);
219220
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYSTEM_RUNTIME));
220221

221222
GetPendingItemsReturnInfo return_value;

lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ AppleGetQueuesHandler::SetupGetQueuesFunction(Thread &thread,
180180

181181
// Next make the runner function for our implementation utility function.
182182
TypeSystemClang *clang_ast_context =
183-
TypeSystemClang::GetScratch(thread.GetProcess()->GetTarget());
183+
ScratchTypeSystemClang::GetForTarget(thread.GetProcess()->GetTarget());
184184
CompilerType get_queues_return_type =
185185
clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType();
186186
Status error;
@@ -220,7 +220,8 @@ AppleGetQueuesHandler::GetCurrentQueues(Thread &thread, addr_t page_to_free,
220220
lldb::StackFrameSP thread_cur_frame = thread.GetStackFrameAtIndex(0);
221221
ProcessSP process_sp(thread.CalculateProcess());
222222
TargetSP target_sp(thread.CalculateTarget());
223-
TypeSystemClang *clang_ast_context = TypeSystemClang::GetScratch(*target_sp);
223+
TypeSystemClang *clang_ast_context =
224+
ScratchTypeSystemClang::GetForTarget(*target_sp);
224225
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYSTEM_RUNTIME));
225226

226227
GetQueuesReturnInfo return_value;

lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ lldb::addr_t AppleGetThreadItemInfoHandler::SetupGetThreadItemInfoFunction(
170170

171171
// Also make the FunctionCaller for this UtilityFunction:
172172

173-
TypeSystemClang *clang_ast_context =
174-
TypeSystemClang::GetScratch(thread.GetProcess()->GetTarget());
173+
TypeSystemClang *clang_ast_context = ScratchTypeSystemClang::GetForTarget(
174+
thread.GetProcess()->GetTarget());
175175
CompilerType get_thread_item_info_return_type =
176176
clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType();
177177

@@ -222,7 +222,8 @@ AppleGetThreadItemInfoHandler::GetThreadItemInfo(Thread &thread,
222222
lldb::StackFrameSP thread_cur_frame = thread.GetStackFrameAtIndex(0);
223223
ProcessSP process_sp(thread.CalculateProcess());
224224
TargetSP target_sp(thread.CalculateTarget());
225-
TypeSystemClang *clang_ast_context = TypeSystemClang::GetScratch(*target_sp);
225+
TypeSystemClang *clang_ast_context =
226+
ScratchTypeSystemClang::GetForTarget(*target_sp);
226227
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYSTEM_RUNTIME));
227228

228229
GetThreadItemInfoReturnInfo return_value;

lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ void SystemRuntimeMacOSX::ReadLibdispatchTSDIndexes() {
414414
#endif
415415

416416
TypeSystemClang *ast_ctx =
417-
TypeSystemClang::GetScratch(m_process->GetTarget());
417+
ScratchTypeSystemClang::GetForTarget(m_process->GetTarget());
418418
if (m_dispatch_tsd_indexes_addr != LLDB_INVALID_ADDRESS) {
419419
CompilerType uint16 =
420420
ast_ctx->GetBuiltinTypeForEncodingAndBitSize(eEncodingUint, 16);

0 commit comments

Comments
 (0)