================
@@ -17,13 +17,40 @@
namespace lldb_private {
class Stream;
+/// Represents a source file whose contents is known (for example
+/// because it can be reconstructed from debug info), but that
+/// hasn't been written to a local disk yet.
+struct LazyFileSpec {
+ virtual ~LazyFileSpec() {}
+ virtual const FileSpec &Materialize() = 0;
+};
+
+/// Wraps either a FileSpec that represents a local file or a
+/// LazyFileSpec that could be materialized into a local file.
+class FileSpecHolder {
+ FileSpec m_file_spec;
+ std::shared_ptr<LazyFileSpec> m_lazy;
----------------
bulbazord wrote:
Why does this hold both if it could be either one? Why not use a
discriminated/tagged/type-safe union like `std::variant` here?
https://github.com/llvm/llvm-project/pull/75880
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits