[PATCH] D148216: Add support for annotations in UpdateTestChecks (NFC)
Nikita Popov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 26 06:28:53 PDT 2023
nikic added inline comments.
================
Comment at: clang/test/utils/update_cc_test_checks/Inputs/annotations.c.expected:12
+// CHECK-NEXT: [[TMP1:%.*]] = load i32, ptr [[X]], align 4
+// CHECK-NEXT: ret i32 [[TMP1]]
+//
----------------
hnrklssn wrote:
> delcypher wrote:
> > @hnrklssn I just noticed we don't have a `CHECK` for what `META2` actually refers to. Should we?
> >
> > Not something that has to be fixed in this patch, more just an observation.
> Indeed this is true for metadata in general, presumably because the RHS often refer to things like other metadata identifiers. In the case of annotations they seem to always refer to simple strings however, so it would be feasible to do a straight match without having to do recursive matching or complex regexes to determine which part of the metadata to match against.
>
> In many cases with metadata attached to IR nodes, multiple nodes refer to the same metadata node, so at least you verify that they still are consistent. But I agree that verifying the content would be a great future addition.
You need to pass `--check-globals` to check the actual metadata.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148216/new/
https://reviews.llvm.org/D148216
More information about the cfe-commits
mailing list