[PATCH] D141315: Verifier: Add checks for associated metadata

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 18 16:57:32 PST 2023


arsenm added inline comments.


================
Comment at: llvm/lib/IR/Verifier.cpp:664
+      const auto *VM = dyn_cast_or_null<ValueAsMetadata>(Op);
+      Check(VM, "associated metadata must be ValueAsMetadata", GO, Associated);
+      if (VM) {
----------------
eugenis wrote:
> It looks like the `!{null}` case will print both "must have a global value" and "must be ValueAsMetadata". We probably want just the first one.
Looking at the test, it doesn't actually hit this one. I'm not actually sure how to construct a not-ValueAsMetadata that would reach here with text IR


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141315/new/

https://reviews.llvm.org/D141315



More information about the llvm-commits mailing list