Skip to content

Commit 76d08e5

Browse files
committed
SupportFileSP -> SupportFileNSP
1 parent 8b1c084 commit 76d08e5

File tree

19 files changed

+90
-91
lines changed

19 files changed

+90
-91
lines changed

lldb/include/lldb/Core/SourceManager.h

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ class SourceManager {
3939
const SourceManager::File &rhs);
4040

4141
public:
42-
File(SupportFileSP support_file_sp, lldb::TargetSP target_sp);
43-
File(SupportFileSP support_file_sp, lldb::DebuggerSP debugger_sp);
42+
File(SupportFileNSP support_file_nsp, lldb::TargetSP target_sp);
43+
File(SupportFileNSP support_file_nsp, lldb::DebuggerSP debugger_sp);
4444

4545
bool ModificationTimeIsStale() const;
4646
bool PathRemappingIsStale() const;
@@ -58,9 +58,9 @@ class SourceManager {
5858

5959
bool LineIsValid(uint32_t line);
6060

61-
SupportFileSP GetSupportFile() const {
62-
assert(m_support_file_sp && "SupportFileSP must always be valid");
63-
return m_support_file_sp;
61+
SupportFileNSP GetSupportFile() const {
62+
assert(m_support_file_nsp && "SupportFileNSP must always be valid");
63+
return m_support_file_nsp;
6464
}
6565

6666
uint32_t GetSourceMapModificationID() const { return m_source_map_mod_id; }
@@ -81,13 +81,13 @@ class SourceManager {
8181

8282
protected:
8383
/// Set file and update modification time.
84-
void SetSupportFile(SupportFileSP support_file_sp);
84+
void SetSupportFile(SupportFileNSP support_file_nsp);
8585

8686
bool CalculateLineOffsets(uint32_t line = UINT32_MAX);
8787

8888
/// The support file. If the target has source mappings, this might be
8989
/// different from the original support file passed to the constructor.
90-
SupportFileSP m_support_file_sp;
90+
SupportFileNSP m_support_file_nsp;
9191

9292
/// Keep track of the on-disk checksum.
9393
Checksum m_checksum;
@@ -108,9 +108,9 @@ class SourceManager {
108108
lldb::TargetWP m_target_wp;
109109

110110
private:
111-
void CommonInitializer(SupportFileSP support_file_sp,
111+
void CommonInitializer(SupportFileNSP support_file_nsp,
112112
lldb::TargetSP target_sp);
113-
void CommonInitializerImpl(SupportFileSP support_file_sp,
113+
void CommonInitializerImpl(SupportFileNSP support_file_nsp,
114114
lldb::TargetSP target_sp);
115115
};
116116

@@ -157,13 +157,13 @@ class SourceManager {
157157

158158
~SourceManager();
159159

160-
FileSP GetLastFile() { return GetFile(m_last_support_file_sp); }
160+
FileSP GetLastFile() { return GetFile(m_last_support_file_nsp); }
161161
bool AtLastLine(bool reverse) {
162162
return m_last_line == UINT32_MAX || (reverse && m_last_line == 1);
163163
}
164164

165165
size_t DisplaySourceLinesWithLineNumbers(
166-
SupportFileSP support_file_sp, uint32_t line, uint32_t column,
166+
SupportFileNSP support_file_nsp, uint32_t line, uint32_t column,
167167
uint32_t context_before, uint32_t context_after,
168168
const char *current_line_cstr, Stream *s,
169169
const SymbolContextList *bp_locs = nullptr);
@@ -177,30 +177,30 @@ class SourceManager {
177177
size_t DisplayMoreWithLineNumbers(Stream *s, uint32_t count, bool reverse,
178178
const SymbolContextList *bp_locs = nullptr);
179179

180-
bool SetDefaultFileAndLine(SupportFileSP support_file_sp, uint32_t line);
180+
bool SetDefaultFileAndLine(SupportFileNSP support_file_nsp, uint32_t line);
181181

182182
struct SupportFileAndLine {
183-
SupportFileSP support_file_sp;
183+
SupportFileNSP support_file_nsp;
184184
uint32_t line;
185-
SupportFileAndLine(SupportFileSP support_file_sp, uint32_t line)
186-
: support_file_sp(support_file_sp), line(line) {}
185+
SupportFileAndLine(SupportFileNSP support_file_nsp, uint32_t line)
186+
: support_file_nsp(support_file_nsp), line(line) {}
187187
};
188188

189189
std::optional<SupportFileAndLine> GetDefaultFileAndLine();
190190

191191
bool DefaultFileAndLineSet() {
192-
return (GetFile(m_last_support_file_sp).get() != nullptr);
192+
return (GetFile(m_last_support_file_nsp).get() != nullptr);
193193
}
194194

195-
void FindLinesMatchingRegex(SupportFileSP support_file_sp,
195+
void FindLinesMatchingRegex(SupportFileNSP support_file_nsp,
196196
RegularExpression &regex, uint32_t start_line,
197197
uint32_t end_line,
198198
std::vector<uint32_t> &match_lines);
199199

200-
FileSP GetFile(SupportFileSP support_file_sp);
200+
FileSP GetFile(SupportFileNSP support_file_nsp);
201201

202202
protected:
203-
SupportFileSP m_last_support_file_sp;
203+
SupportFileNSP m_last_support_file_nsp;
204204
uint32_t m_last_line;
205205
uint32_t m_last_count;
206206
bool m_default_set;

lldb/include/lldb/Symbol/CompileUnit.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class CompileUnit : public std::enable_shared_from_this<CompileUnit>,
9393
/// \param[in] user_data
9494
/// User data where the SymbolFile parser can store data.
9595
///
96-
/// \param[in] support_file_sp
96+
/// \param[in] support_file_nsp
9797
/// The file specification for the source file of this compile
9898
/// unit.
9999
///
@@ -118,7 +118,7 @@ class CompileUnit : public std::enable_shared_from_this<CompileUnit>,
118118
/// An rvalue list of already parsed support files.
119119
/// \see lldb::LanguageType
120120
CompileUnit(const lldb::ModuleSP &module_sp, void *user_data,
121-
SupportFileSP support_file_sp, lldb::user_id_t uid,
121+
SupportFileNSP support_file_nsp, lldb::user_id_t uid,
122122
lldb::LanguageType language, lldb_private::LazyBool is_optimized,
123123
SupportFileList &&support_files = {});
124124

@@ -230,12 +230,12 @@ class CompileUnit : public std::enable_shared_from_this<CompileUnit>,
230230

231231
/// Return the primary source spec associated with this compile unit.
232232
const FileSpec &GetPrimaryFile() const {
233-
return m_primary_support_file_sp->GetSpecOnly();
233+
return m_primary_support_file_nsp->GetSpecOnly();
234234
}
235235

236236
/// Return the primary source file associated with this compile unit.
237-
SupportFileSP GetPrimarySupportFile() const {
238-
return m_primary_support_file_sp;
237+
SupportFileNSP GetPrimarySupportFile() const {
238+
return m_primary_support_file_nsp;
239239
}
240240

241241
/// Get the line table for the compile unit.
@@ -430,7 +430,7 @@ class CompileUnit : public std::enable_shared_from_this<CompileUnit>,
430430
/// compile unit.
431431
std::vector<SourceModule> m_imported_modules;
432432
/// The primary file associated with this compile unit.
433-
SupportFileSP m_primary_support_file_sp;
433+
SupportFileNSP m_primary_support_file_nsp;
434434
/// Files associated with this compile unit's line table and declarations.
435435
SupportFileList m_support_files;
436436
/// Line table that will get parsed on demand.

lldb/include/lldb/Symbol/Function.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,11 +469,12 @@ class Function : public UserID, public SymbolContextScope {
469469
///
470470
/// \param[out] line_no
471471
/// The line number.
472-
void GetStartLineSourceInfo(SupportFileSP &source_file_sp, uint32_t &line_no);
472+
void GetStartLineSourceInfo(SupportFileNSP &source_file_sp,
473+
uint32_t &line_no);
473474

474475
using SourceRange = Range<uint32_t, uint32_t>;
475476
/// Find the file and line number range of the function.
476-
llvm::Expected<std::pair<SupportFileSP, SourceRange>> GetSourceInfo();
477+
llvm::Expected<std::pair<SupportFileNSP, SourceRange>> GetSourceInfo();
477478

478479
/// Get the outgoing call edges from this function, sorted by their return
479480
/// PC addresses (in increasing order).

lldb/include/lldb/Symbol/LineEntry.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@ struct LineEntry {
137137
AddressRange range;
138138

139139
/// The source file, possibly mapped by the target.source-map setting.
140-
SupportFileSP file_sp;
140+
SupportFileNSP file_sp;
141141

142142
/// The original source file, from debug info.
143-
SupportFileSP original_file_sp;
143+
SupportFileNSP original_file_sp;
144144

145145
/// The source line number, or LLDB_INVALID_LINE_NUMBER if there is no line
146146
/// number information.

lldb/include/lldb/Utility/FileSpecList.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class SupportFileList {
4141
bool AppendIfUnique(const FileSpec &file);
4242
size_t GetSize() const { return m_files.size(); }
4343
const FileSpec &GetFileSpecAtIndex(size_t idx) const;
44-
SupportFileSP GetSupportFileAtIndex(size_t idx) const;
44+
SupportFileNSP GetSupportFileAtIndex(size_t idx) const;
4545
size_t FindFileIndex(size_t idx, const FileSpec &file, bool full) const;
4646
/// Find a compatible file index.
4747
///

lldb/include/lldb/Utility/SupportFile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class SupportFile {
7777
const Checksum m_checksum;
7878
};
7979

80-
typedef NonNullSharedPtr<lldb_private::SupportFile> SupportFileSP;
80+
typedef NonNullSharedPtr<lldb_private::SupportFile> SupportFileNSP;
8181

8282
} // namespace lldb_private
8383

lldb/source/Breakpoint/BreakpointResolverFileLine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void BreakpointResolverFileLine::FilterContexts(SymbolContextList &sc_list) {
139139
if (!sc.block)
140140
continue;
141141

142-
SupportFileSP file_sp = std::make_shared<SupportFile>();
142+
SupportFileNSP file_sp = std::make_shared<SupportFile>();
143143
uint32_t line;
144144
const Block *inline_block = sc.block->GetContainingInlinedBlock();
145145
if (inline_block) {

lldb/source/Commands/CommandObjectBreakpoint.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ class CommandObjectBreakpointSet : public CommandObjectParsed {
795795
// frame's file.
796796
if (auto maybe_file_and_line =
797797
target.GetSourceManager().GetDefaultFileAndLine()) {
798-
file = maybe_file_and_line->support_file_sp->GetSpecOnly();
798+
file = maybe_file_and_line->support_file_nsp->GetSpecOnly();
799799
return true;
800800
}
801801

lldb/source/Commands/CommandObjectSource.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ class CommandObjectSourceList : public CommandObjectParsed {
777777
if (sc.function) {
778778
Target &target = GetTarget();
779779

780-
SupportFileSP start_file = std::make_shared<SupportFile>();
780+
SupportFileNSP start_file = std::make_shared<SupportFile>();
781781
uint32_t start_line;
782782
uint32_t end_line;
783783
FileSpec end_file;
@@ -1194,7 +1194,7 @@ class CommandObjectSourceList : public CommandObjectParsed {
11941194
// file(s) will be found and assigned to
11951195
// sc.comp_unit->GetPrimarySupportFile, which is NOT what we want to
11961196
// print. Instead, we want to print the one from the line entry.
1197-
SupportFileSP found_file_sp = sc.line_entry.file_sp;
1197+
SupportFileNSP found_file_sp = sc.line_entry.file_sp;
11981198

11991199
target.GetSourceManager().DisplaySourceLinesWithLineNumbers(
12001200
found_file_sp, m_options.start_line, column, 0,

lldb/source/Core/Disassembler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ Disassembler::GetFunctionDeclLineEntry(const SymbolContext &sc) {
208208
return {};
209209

210210
LineEntry prologue_end_line = sc.line_entry;
211-
SupportFileSP func_decl_file_sp = std::make_shared<SupportFile>();
211+
SupportFileNSP func_decl_file_sp = std::make_shared<SupportFile>();
212212
uint32_t func_decl_line;
213213
sc.function->GetStartLineSourceInfo(func_decl_file_sp, func_decl_line);
214214

@@ -539,7 +539,7 @@ void Disassembler::PrintInstructions(Debugger &debugger, const ArchSpec &arch,
539539
LineEntry prologue_end_line = sc.line_entry;
540540
if (!ElideMixedSourceAndDisassemblyLine(exe_ctx, sc,
541541
prologue_end_line)) {
542-
SupportFileSP func_decl_file_sp =
542+
SupportFileNSP func_decl_file_sp =
543543
std::make_shared<SupportFile>();
544544
uint32_t func_decl_line;
545545
sc.function->GetStartLineSourceInfo(func_decl_file_sp,

0 commit comments

Comments
 (0)