[llvm] [VPlan] Implement printing VPIRMetadata. (PR #165825)

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 3 05:25:07 PST 2025


================
@@ -968,6 +968,12 @@ class VPIRMetadata {
   /// Intersect this VPIRMetada object with \p MD, keeping only metadata
   /// nodes that are common to both.
   void intersect(const VPIRMetadata &MD);
+
+  /// Print metadata with node IDs.
+  void print(raw_ostream &O, const Module &M) const;
+
+  /// Return true if there is any metadata to print.
+  bool empty() const { return Metadata.empty(); }
----------------
ayalz wrote:

Redundant - `print()` checks anyhow if there is any metadata to print?

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


More information about the llvm-commits mailing list