Skip to content

Commit f8a3cbb

Browse files
author
George Hu
committed
Code style fix
1 parent dff74fa commit f8a3cbb

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

lldb/include/lldb/Core/ModuleSpec.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,9 @@ class ModuleSpec {
274274
ArchSpec m_arch;
275275
UUID m_uuid;
276276
ConstString m_object_name;
277-
std::weak_ptr<Target>
278-
m_target; // This is set to take advantage of the target's search path
279-
// and platform's locate module callback
277+
/// This is set to take advantage of the target's search path and platform's
278+
/// locate module callback
279+
std::weak_ptr<Target> m_target;
280280
uint64_t m_object_offset = 0;
281281
uint64_t m_object_size = 0;
282282
llvm::sys::TimePoint<> m_object_mod_time;

lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,8 @@ Status PlatformDarwin::GetSharedModule(
353353
// Get module search paths from the target if available.
354354
TargetSP target_sp = module_spec.GetTargetSP();
355355
FileSpecList module_search_paths;
356-
if (target_sp) {
356+
if (target_sp)
357357
module_search_paths = target_sp->GetExecutableSearchPaths();
358-
}
359358
if (!module_sp && !module_search_paths.IsEmpty() && platform_file) {
360359
// We can try to pull off part of the file path up to the bundle
361360
// directory level and try any module search paths...
@@ -1310,9 +1309,8 @@ lldb_private::Status PlatformDarwin::FindBundleBinaryInExecSearchPaths(
13101309
const FileSpec &platform_file = module_spec.GetFileSpec();
13111310
TargetSP target_sp = module_spec.GetTargetSP();
13121311
FileSpecList module_search_paths;
1313-
if (target_sp) {
1312+
if (target_sp)
13141313
module_search_paths = target_sp->GetExecutableSearchPaths();
1315-
}
13161314
// See if the file is present in any of the module_search_paths
13171315
// directories.
13181316
if (!module_sp && !module_search_paths.IsEmpty() && platform_file) {

lldb/source/Target/Target.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1776,7 +1776,7 @@ bool Target::SetArchitecture(const ArchSpec &arch_spec, bool set_platform,
17761776
arch_spec.GetArchitectureName(),
17771777
arch_spec.GetTriple().getTriple().c_str());
17781778
ModuleSpec module_spec(executable_sp->GetFileSpec(), other);
1779-
module_spec.SetTarget(this->shared_from_this());
1779+
module_spec.SetTarget(shared_from_this());
17801780
Status error = ModuleList::GetSharedModule(module_spec, executable_sp,
17811781
nullptr, nullptr);
17821782

@@ -2347,7 +2347,7 @@ ModuleSP Target::GetOrCreateModule(const ModuleSpec &orig_module_spec,
23472347

23482348
// Apply any remappings specified in target.object-map:
23492349
ModuleSpec module_spec(orig_module_spec);
2350-
module_spec.SetTarget(this->shared_from_this());
2350+
module_spec.SetTarget(shared_from_this());
23512351
PathMappingList &obj_mapping = GetObjectPathMap();
23522352
if (std::optional<FileSpec> remapped_obj_file =
23532353
obj_mapping.RemapPath(orig_module_spec.GetFileSpec().GetPath(),
@@ -2406,7 +2406,7 @@ ModuleSP Target::GetOrCreateModule(const ModuleSpec &orig_module_spec,
24062406
transformed_spec.GetFileSpec().SetDirectory(transformed_dir);
24072407
transformed_spec.GetFileSpec().SetFilename(
24082408
module_spec.GetFileSpec().GetFilename());
2409-
transformed_spec.SetTarget(this->shared_from_this());
2409+
transformed_spec.SetTarget(shared_from_this());
24102410
error = ModuleList::GetSharedModule(transformed_spec, module_sp,
24112411
&old_modules, &did_create_module);
24122412
}

0 commit comments

Comments
 (0)