Skip to content

Commit b1dabed

Browse files
committed
[lldb][NFC] Rename TypeSystemClang::GetScratch to ScratchTypeSystemClang::GetForTarget
Also add some documentation while I'm at it. (cherry picked from commit 594308c)
1 parent 59b8e78 commit b1dabed

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
@@ -1301,7 +1301,8 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapDynamic(
13011301
return DescriptorMapUpdateResult::Fail();
13021302

13031303
thread_sp->CalculateExecutionContext(exe_ctx);
1304-
TypeSystemClang *ast = TypeSystemClang::GetScratch(process->GetTarget());
1304+
TypeSystemClang *ast =
1305+
ScratchTypeSystemClang::GetForTarget(process->GetTarget());
13051306

13061307
if (!ast)
13071308
return DescriptorMapUpdateResult::Fail();
@@ -1561,7 +1562,8 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapSharedCache() {
15611562
return DescriptorMapUpdateResult::Fail();
15621563

15631564
thread_sp->CalculateExecutionContext(exe_ctx);
1564-
TypeSystemClang *ast = TypeSystemClang::GetScratch(process->GetTarget());
1565+
TypeSystemClang *ast =
1566+
ScratchTypeSystemClang::GetForTarget(process->GetTarget());
15651567

15661568
if (!ast)
15671569
return DescriptorMapUpdateResult::Fail();
@@ -2637,7 +2639,7 @@ class ObjCExceptionRecognizedStackFrame : public RecognizedStackFrame {
26372639
if (!abi) return;
26382640

26392641
TypeSystemClang *clang_ast_context =
2640-
TypeSystemClang::GetScratch(process_sp->GetTarget());
2642+
ScratchTypeSystemClang::GetForTarget(process_sp->GetTarget());
26412643
if (!clang_ast_context)
26422644
return;
26432645
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

@@ -839,8 +839,8 @@ AppleObjCTrampolineHandler::SetupDispatchFunction(Thread &thread,
839839
}
840840

841841
// Next make the runner function for our implementation utility function.
842-
TypeSystemClang *clang_ast_context =
843-
TypeSystemClang::GetScratch(thread.GetProcess()->GetTarget());
842+
TypeSystemClang *clang_ast_context = ScratchTypeSystemClang::GetForTarget(
843+
thread.GetProcess()->GetTarget());
844844
if (!clang_ast_context)
845845
return LLDB_INVALID_ADDRESS;
846846

@@ -944,7 +944,8 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(Thread &thread,
944944

945945
TargetSP target_sp(thread.CalculateTarget());
946946

947-
TypeSystemClang *clang_ast_context = TypeSystemClang::GetScratch(*target_sp);
947+
TypeSystemClang *clang_ast_context =
948+
ScratchTypeSystemClang::GetForTarget(*target_sp);
948949
if (!clang_ast_context)
949950
return ret_plan_sp;
950951

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

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

565565
// Fetch the clang types we will need:
566-
TypeSystemClang *ast = TypeSystemClang::GetScratch(process->GetTarget());
566+
TypeSystemClang *ast =
567+
ScratchTypeSystemClang::GetForTarget(process->GetTarget());
567568
if (!ast)
568569
return nullptr;
569570

@@ -807,7 +808,8 @@ uint32_t PlatformPOSIX::DoLoadImage(lldb_private::Process *process,
807808

808809
Value return_value;
809810
// Fetch the clang types we will need:
810-
TypeSystemClang *ast = TypeSystemClang::GetScratch(process->GetTarget());
811+
TypeSystemClang *ast =
812+
ScratchTypeSystemClang::GetForTarget(process->GetTarget());
811813
if (!ast) {
812814
error.SetErrorString("dlopen error: Unable to get TypeSystemClang");
813815
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
@@ -227,7 +227,8 @@ AppleGetItemInfoHandler::GetItemInfo(Thread &thread, uint64_t item,
227227
lldb::StackFrameSP thread_cur_frame = thread.GetStackFrameAtIndex(0);
228228
ProcessSP process_sp(thread.CalculateProcess());
229229
TargetSP target_sp(thread.CalculateTarget());
230-
TypeSystemClang *clang_ast_context = TypeSystemClang::GetScratch(*target_sp);
230+
TypeSystemClang *clang_ast_context =
231+
ScratchTypeSystemClang::GetForTarget(*target_sp);
231232
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYSTEM_RUNTIME));
232233

233234
GetItemInfoReturnInfo return_value;

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

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

175175
// Next make the runner function for our implementation utility function.
176176
Status error;
177-
TypeSystemClang *clang_ast_context =
178-
TypeSystemClang::GetScratch(thread.GetProcess()->GetTarget());
177+
TypeSystemClang *clang_ast_context = ScratchTypeSystemClang::GetForTarget(
178+
thread.GetProcess()->GetTarget());
179179
CompilerType get_pending_items_return_type =
180180
clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType();
181181
get_pending_items_caller =
@@ -226,7 +226,8 @@ AppleGetPendingItemsHandler::GetPendingItems(Thread &thread, addr_t queue,
226226
lldb::StackFrameSP thread_cur_frame = thread.GetStackFrameAtIndex(0);
227227
ProcessSP process_sp(thread.CalculateProcess());
228228
TargetSP target_sp(thread.CalculateTarget());
229-
TypeSystemClang *clang_ast_context = TypeSystemClang::GetScratch(*target_sp);
229+
TypeSystemClang *clang_ast_context =
230+
ScratchTypeSystemClang::GetForTarget(*target_sp);
230231
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYSTEM_RUNTIME));
231232

232233
GetPendingItemsReturnInfo return_value;

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

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

192192
// Next make the runner function for our implementation utility function.
193193
TypeSystemClang *clang_ast_context =
194-
TypeSystemClang::GetScratch(thread.GetProcess()->GetTarget());
194+
ScratchTypeSystemClang::GetForTarget(thread.GetProcess()->GetTarget());
195195
CompilerType get_queues_return_type =
196196
clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType();
197197
Status error;
@@ -231,7 +231,8 @@ AppleGetQueuesHandler::GetCurrentQueues(Thread &thread, addr_t page_to_free,
231231
lldb::StackFrameSP thread_cur_frame = thread.GetStackFrameAtIndex(0);
232232
ProcessSP process_sp(thread.CalculateProcess());
233233
TargetSP target_sp(thread.CalculateTarget());
234-
TypeSystemClang *clang_ast_context = TypeSystemClang::GetScratch(*target_sp);
234+
TypeSystemClang *clang_ast_context =
235+
ScratchTypeSystemClang::GetForTarget(*target_sp);
235236
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYSTEM_RUNTIME));
236237

237238
GetQueuesReturnInfo return_value;

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

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

184184
// Also make the FunctionCaller for this UtilityFunction:
185185

186-
TypeSystemClang *clang_ast_context =
187-
TypeSystemClang::GetScratch(thread.GetProcess()->GetTarget());
186+
TypeSystemClang *clang_ast_context = ScratchTypeSystemClang::GetForTarget(
187+
thread.GetProcess()->GetTarget());
188188
CompilerType get_thread_item_info_return_type =
189189
clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType();
190190

@@ -235,7 +235,8 @@ AppleGetThreadItemInfoHandler::GetThreadItemInfo(Thread &thread,
235235
lldb::StackFrameSP thread_cur_frame = thread.GetStackFrameAtIndex(0);
236236
ProcessSP process_sp(thread.CalculateProcess());
237237
TargetSP target_sp(thread.CalculateTarget());
238-
TypeSystemClang *clang_ast_context = TypeSystemClang::GetScratch(*target_sp);
238+
TypeSystemClang *clang_ast_context =
239+
ScratchTypeSystemClang::GetForTarget(*target_sp);
239240
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYSTEM_RUNTIME));
240241

241242
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)