@@ -49,13 +49,6 @@ using namespace lldb_private;
4949
5050static inline bool is_newline_char (char ch) { return ch == ' \n ' || ch == ' \r ' ; }
5151
52- static void resolve_tilde (FileSpec &file_spec) {
53- if (!FileSystem::Instance ().Exists (file_spec) &&
54- file_spec.GetDirectory ().GetCString ()[0 ] == ' ~' ) {
55- FileSystem::Instance ().Resolve (file_spec);
56- }
57- }
58-
5952// SourceManager constructor
6053SourceManager::SourceManager (const TargetSP &target_sp)
6154 : m_last_line(0 ), m_last_count(0 ), m_default_set(false ),
@@ -73,13 +66,10 @@ SourceManager::FileSP SourceManager::GetFile(const FileSpec &file_spec) {
7366 if (!file_spec)
7467 return nullptr ;
7568
76- FileSpec resolved_fspec = file_spec;
77- resolve_tilde (resolved_fspec);
78-
7969 DebuggerSP debugger_sp (m_debugger_wp.lock ());
8070 FileSP file_sp;
8171 if (debugger_sp && debugger_sp->GetUseSourceCache ())
82- file_sp = debugger_sp->GetSourceFileCache ().FindSourceFile (resolved_fspec );
72+ file_sp = debugger_sp->GetSourceFileCache ().FindSourceFile (file_spec );
8373
8474 TargetSP target_sp (m_target_wp.lock ());
8575
@@ -97,9 +87,9 @@ SourceManager::FileSP SourceManager::GetFile(const FileSpec &file_spec) {
9787 // If file_sp is no good or it points to a non-existent file, reset it.
9888 if (!file_sp || !FileSystem::Instance ().Exists (file_sp->GetFileSpec ())) {
9989 if (target_sp)
100- file_sp = std::make_shared<File>(resolved_fspec , target_sp.get ());
90+ file_sp = std::make_shared<File>(file_spec , target_sp.get ());
10191 else
102- file_sp = std::make_shared<File>(resolved_fspec , debugger_sp);
92+ file_sp = std::make_shared<File>(file_spec , debugger_sp);
10393
10494 if (debugger_sp && debugger_sp->GetUseSourceCache ())
10595 debugger_sp->GetSourceFileCache ().AddSourceFile (file_sp);
@@ -451,7 +441,6 @@ void SourceManager::File::CommonInitializer(const FileSpec &file_spec,
451441 }
452442 }
453443 }
454- resolve_tilde (m_file_spec);
455444 // Try remapping if m_file_spec does not correspond to an existing file.
456445 if (!FileSystem::Instance ().Exists (m_file_spec)) {
457446 // Check target specific source remappings (i.e., the
0 commit comments