@@ -295,28 +295,6 @@ CreateExceptionResolver(const lldb::BreakpointSP &bkpt, bool catch_bp, bool thro
295295 return resolver_sp;
296296}
297297
298- static std::unique_ptr<swift::SwiftObjectFileFormat>
299- GetObjectFileFormat (llvm::Triple::ObjectFormatType obj_format_type) {
300- std::unique_ptr<swift::SwiftObjectFileFormat> obj_file_format;
301- switch (obj_format_type) {
302- case llvm::Triple::MachO:
303- obj_file_format = std::make_unique<swift::SwiftObjectFileFormatMachO>();
304- break ;
305- case llvm::Triple::ELF:
306- obj_file_format = std::make_unique<swift::SwiftObjectFileFormatELF>();
307- break ;
308- case llvm::Triple::COFF:
309- obj_file_format = std::make_unique<swift::SwiftObjectFileFormatCOFF>();
310- break ;
311- default :
312- if (Log *log = GetLog (LLDBLog::Types))
313- log->Printf (" %s: Could not find out swift reflection section names for "
314- " object format type." ,
315- __FUNCTION__);
316- }
317- return obj_file_format;
318- }
319-
320298static bool HasReflectionInfo (ObjectFile *obj_file) {
321299 if (!obj_file)
322300 return false ;
@@ -332,7 +310,7 @@ static bool HasReflectionInfo(ObjectFile *obj_file) {
332310
333311 const auto obj_format_type =
334312 obj_file->GetArchitecture ().GetTriple ().getObjectFormat ();
335- auto obj_file_format_up = GetObjectFileFormat (obj_format_type);
313+ auto obj_file_format_up = GetSwiftObjectFileFormat (obj_format_type);
336314 if (!obj_file_format_up)
337315 return false ;
338316
@@ -561,7 +539,7 @@ bool SwiftLanguageRuntime::AddJitObjectFileToReflectionContext(
561539 llvm::SmallVector<llvm::StringRef, 1 > likely_module_names) {
562540 assert (obj_file.GetType () == ObjectFile::eTypeJIT &&
563541 " Not a JIT object file!" );
564- auto obj_file_format = GetObjectFileFormat (obj_format_type);
542+ auto obj_file_format = GetSwiftObjectFileFormat (obj_format_type);
565543
566544 if (!obj_file_format)
567545 return false ;
@@ -607,7 +585,7 @@ std::optional<uint32_t> SwiftLanguageRuntime::AddObjectFileToReflectionContext(
607585 auto obj_format_type =
608586 module ->GetArchitecture ().GetTriple ().getObjectFormat ();
609587
610- auto obj_file_format = GetObjectFileFormat (obj_format_type);
588+ auto obj_file_format = GetSwiftObjectFileFormat (obj_format_type);
611589 if (!obj_file_format)
612590 return {};
613591
0 commit comments