aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectSource.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2024-09-03 10:33:30 -0700
committerJonas Devlieghere <jonas@devlieghere.com>2024-09-03 14:38:39 -0700
commit98bde7fd872c10e49035d5dc5d2f2b44489f6a07 (patch)
tree359de1ee43e0d913e86f1d018f7d06f9e92a79a2 /lldb/source/Commands/CommandObjectSource.cpp
parentd966d4708fe5084e47ca3d9d411935d6870aefff (diff)
downloadllvm-98bde7fd872c10e49035d5dc5d2f2b44489f6a07.zip
llvm-98bde7fd872c10e49035d5dc5d2f2b44489f6a07.tar.gz
llvm-98bde7fd872c10e49035d5dc5d2f2b44489f6a07.tar.bz2
[lldb] Avoid FileSpec indirection where we can use SupportFiles directly
Now that more parts of LLDB know about SupportFiles, avoid going through FileSpec (and losing the Checksum in the process). Instead, use the SupportFile directly.
Diffstat (limited to 'lldb/source/Commands/CommandObjectSource.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectSource.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Commands/CommandObjectSource.cpp b/lldb/source/Commands/CommandObjectSource.cpp
index 1fc1224..86c090f 100644
--- a/lldb/source/Commands/CommandObjectSource.cpp
+++ b/lldb/source/Commands/CommandObjectSource.cpp
@@ -1053,7 +1053,7 @@ protected:
? sc.line_entry.column
: 0;
target.GetSourceManager().DisplaySourceLinesWithLineNumbers(
- std::make_shared<SupportFile>(sc.comp_unit->GetPrimaryFile()),
+ sc.comp_unit->GetPrimarySupportFile(),
sc.line_entry.line, column, lines_to_back_up,
m_options.num_lines - lines_to_back_up, "->",
&result.GetOutputStream(), GetBreakpointLocations());
@@ -1174,7 +1174,7 @@ protected:
m_options.num_lines = 10;
const uint32_t column = 0;
target.GetSourceManager().DisplaySourceLinesWithLineNumbers(
- std::make_shared<SupportFile>(sc.comp_unit->GetPrimaryFile()),
+ sc.comp_unit->GetPrimarySupportFile(),
m_options.start_line, column, 0, m_options.num_lines, "",
&result.GetOutputStream(), GetBreakpointLocations());