[Lldb-commits] [lldb] [lldb] Store SupportFiles in SourceManager::File (NFC) (PR #106639)

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 29 15:09:38 PDT 2024


================
@@ -70,15 +73,17 @@ class SourceManager {
 
   protected:
     /// Set file and update modification time.
-    void SetFileSpec(FileSpec file_spec);
+    void SetSupportFile(lldb::SupportFileSP support_file_sp);
 
     bool CalculateLineOffsets(uint32_t line = UINT32_MAX);
 
-    FileSpec m_file_spec_orig; // The original file spec that was used (can be
-                               // different from m_file_spec)
-    FileSpec m_file_spec; // The actually file spec being used (if the target
-                          // has source mappings, this might be different from
-                          // m_file_spec_orig)
+    /// The original support file that was used.
+    lldb::SupportFileSP m_original_support_file_sp;
----------------
adrian-prantl wrote:

I suppose the SourceManager cannot own it because the SupportFile may outlive it?

https://github.com/llvm/llvm-project/pull/106639


More information about the lldb-commits mailing list