[llvm] [DebugInfo] Make DIExpression inherit from Metadata and it always should be unique (PR #79335)

Stephen Tozer via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 6 05:22:13 PST 2024


================
@@ -2656,31 +2656,27 @@ class DIVariable : public DINode {
 /// DW_OP_stack_value) is the constant variable value.
 ///
 /// TODO: Co-allocate the expression elements.
-/// TODO: Separate from MDNode, or otherwise drop Distinct and Temporary
-/// storage types.
-class DIExpression : public MDNode {
+class DIExpression : public Metadata, ReplaceableMetadataImpl {
----------------
SLTozer wrote:

I think that comment would be something along the lines of "DIExpressions do not refer to other metadata and are trivially always unique, so do not need to inherit from MDNode."

https://github.com/llvm/llvm-project/pull/79335


More information about the llvm-commits mailing list