https://github.com/lhames created https://github.com/llvm/llvm-project/pull/214889
None >From f51cceb3e8d9997562df51cbfa5734078f4ddf35 Mon Sep 17 00:00:00 2001 From: Lang Hames <[email protected]> Date: Thu, 6 Aug 2026 12:08:29 +1000 Subject: [PATCH] [lldb] Add a class comment for Materializer. NFC. --- lldb/include/lldb/Expression/Materializer.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lldb/include/lldb/Expression/Materializer.h b/lldb/include/lldb/Expression/Materializer.h index 64ed545febf15..d7e0a9dc85e59 100644 --- a/lldb/include/lldb/Expression/Materializer.h +++ b/lldb/include/lldb/Expression/Materializer.h @@ -21,6 +21,18 @@ namespace lldb_private { +/// Materializer packs the variables an expression reads and writes into a +/// single argument struct, and unpacks them again afterward. +/// +/// Expressions can't have real addresses for the variables they touch baked +/// into their IR, since some of those addresses (e.g. frame-relative locals) +/// aren't known until the moment of execution. IRForTarget rewrites such +/// accesses into reads from one struct instead, registering an Entity per +/// variable via AddVariable/AddPersistentVariable/AddResultVariable. +/// Materialize() lays out and populates that struct against a target +/// IRMemoryMap, independent of whether the expression is later interpreted or +/// JIT'd and run; the returned Dematerializer reverses the process afterward, +/// copying side effects back out and extracting the result. class Materializer { public: Materializer() = default; _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
