[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
Wed Jan 24 13:26:36 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 don't think DIExpression needs to inherit from ReplaceableMetadataImpl - it will never be temporary, and we never need to track its users or replace its uses.

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


More information about the llvm-commits mailing list