================
@@ -420,13 +428,17 @@ class FileSpec {
   ///   The lifetime of the StringRefs is tied to the lifetime of the FileSpec.
   std::vector<llvm::StringRef> GetComponents() const;
 
+  /// Return the checksum for this FileSpec or all zeros if there is none.
+  const Checksum &GetChecksum() const { return m_checksum; };
+
 protected:
   // Convenience method for setting the file without changing the style.
   void SetFile(llvm::StringRef path);
 
   /// Called anytime m_directory or m_filename is changed to clear any cached
   /// state in this object.
   void PathWasModified() {
+    m_checksum = Checksum();
----------------
medismailben wrote:

Would be nice to recompute the checksum if the path was changed. 

https://github.com/llvm/llvm-project/pull/71457
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to