llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Lang Hames (lhames)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/214889.diff


1 Files Affected:

- (modified) lldb/include/lldb/Expression/Materializer.h (+12) 


``````````diff
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;

``````````

</details>


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

Reply via email to