@@ -49,13 +49,6 @@ using namespace lldb_private;
49
49
50
50
static inline bool is_newline_char (char ch) { return ch == ' \n ' || ch == ' \r ' ; }
51
51
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
-
59
52
// SourceManager constructor
60
53
SourceManager::SourceManager (const TargetSP &target_sp)
61
54
: m_last_line(0 ), m_last_count(0 ), m_default_set(false ),
@@ -73,13 +66,10 @@ SourceManager::FileSP SourceManager::GetFile(const FileSpec &file_spec) {
73
66
if (!file_spec)
74
67
return nullptr ;
75
68
76
- FileSpec resolved_fspec = file_spec;
77
- resolve_tilde (resolved_fspec);
78
-
79
69
DebuggerSP debugger_sp (m_debugger_wp.lock ());
80
70
FileSP file_sp;
81
71
if (debugger_sp && debugger_sp->GetUseSourceCache ())
82
- file_sp = debugger_sp->GetSourceFileCache ().FindSourceFile (resolved_fspec );
72
+ file_sp = debugger_sp->GetSourceFileCache ().FindSourceFile (file_spec );
83
73
84
74
TargetSP target_sp (m_target_wp.lock ());
85
75
@@ -97,9 +87,9 @@ SourceManager::FileSP SourceManager::GetFile(const FileSpec &file_spec) {
97
87
// If file_sp is no good or it points to a non-existent file, reset it.
98
88
if (!file_sp || !FileSystem::Instance ().Exists (file_sp->GetFileSpec ())) {
99
89
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 ());
101
91
else
102
- file_sp = std::make_shared<File>(resolved_fspec , debugger_sp);
92
+ file_sp = std::make_shared<File>(file_spec , debugger_sp);
103
93
104
94
if (debugger_sp && debugger_sp->GetUseSourceCache ())
105
95
debugger_sp->GetSourceFileCache ().AddSourceFile (file_sp);
@@ -451,7 +441,6 @@ void SourceManager::File::CommonInitializer(const FileSpec &file_spec,
451
441
}
452
442
}
453
443
}
454
- resolve_tilde (m_file_spec);
455
444
// Try remapping if m_file_spec does not correspond to an existing file.
456
445
if (!FileSystem::Instance ().Exists (m_file_spec)) {
457
446
// Check target specific source remappings (i.e., the
0 commit comments