[PATCH] D71730: Make lazyload_metadata.ll resilient to the addition of new metadata kinds
Brian Gesiak via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 20 06:48:34 PST 2019
modocache added reviewers: mehdi_amini, ostannard.
modocache added a subscriber: ostannard.
modocache added a comment.
As a maintainer of a downstream fork of LLVM with its own metadata kinds, I'm a big fan of this change. Until this patch:
1. Whenever anyone added a metadata kind, either to upstream LLVM or to my downstream fork, they'd need to remember to increment the number in the check for `74 bitcode-reader - Number of Metadata records loaded`.
2. Whenever someone added a metadata kind to upstream LLVM and update this test, the upstream change to this test file would conflict with my downstream changes to the test file. Or, if there was no conflict because the number of records was the same, my downstream test would start failing, and I would need to open this test file and increment the count to account for my downstream metadata kinds.
This change makes this test less brittle and has it focus only on testing lazy loading, which is I believe what the original test author, @mehdi_amini, intended. (I'll also suggest @ostannard as a reviewer since he last incremented the count in this file.)
Anyway this looks great to me but I'll wait for more reviews.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71730/new/
https://reviews.llvm.org/D71730
More information about the llvm-commits
mailing list