From 8f3be7a32b631e9ba584872c1f0dde8fd8536c07 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 1 Nov 2018 21:05:36 +0000 Subject: [FileSystem] Move path resolution logic out of FileSpec This patch removes the logic for resolving paths out of FileSpec and updates call sites to rely on the FileSystem class instead. Differential revision: https://reviews.llvm.org/D53915 llvm-svn: 345890 --- .../DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp') diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp index 65bc051e03c..862e4895022 100644 --- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp +++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp @@ -435,8 +435,8 @@ DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress(lldb::addr_t addr, if (header.filetype == llvm::MachO::MH_EXECUTE && (header.flags & llvm::MachO::MH_DYLDLINK) == 0) { // Create a full module to get the UUID - ModuleSP memory_module_sp = process->ReadModuleFromMemory( - FileSpec("temp_mach_kernel", false), addr); + ModuleSP memory_module_sp = + process->ReadModuleFromMemory(FileSpec("temp_mach_kernel"), addr); if (!memory_module_sp.get()) return UUID(); @@ -646,8 +646,7 @@ bool DynamicLoaderDarwinKernel::KextImageInfo::ReadMemoryModule( if (m_load_address == LLDB_INVALID_ADDRESS) return false; - FileSpec file_spec; - file_spec.SetFile(m_name.c_str(), false, FileSpec::Style::native); + FileSpec file_spec(m_name.c_str()); llvm::MachO::mach_header mh; size_t size_to_read = 512; @@ -807,7 +806,7 @@ bool DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule( PlatformDarwinKernel::GetPluginNameStatic()); if (platform_name == g_platform_name) { ModuleSpec kext_bundle_module_spec(module_spec); - FileSpec kext_filespec(m_name.c_str(), false); + FileSpec kext_filespec(m_name.c_str()); kext_bundle_module_spec.GetFileSpec() = kext_filespec; platform_sp->GetSharedModule( kext_bundle_module_spec, process, m_module_sp, -- cgit v1.2.1