================
@@ -858,7 +858,7 @@ class DataExtractor {
     return GetSubsetExtractorSP(0);
   }
 
-  lldb::DataBufferSP &GetSharedDataBuffer() { return m_data_sp; }
+  const lldb::DataBufferSP &GetSharedDataBuffer() const { return m_data_sp; }
----------------
JDevlieghere wrote:

Should this just return a copy? Or is the purpose of the interface to make it 
clear that the lifetime is tied to the DataExtractor? I'm fine either way, the 
current design is probably more explicit about the lifetime expectations at the 
cost of being slightly less safe to use. 

https://github.com/llvm/llvm-project/pull/179858
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to