Also add missing assembler test for the valid cases.
Details
Diff Detail
Unit Tests
Event Timeline
LGTM with a comment
llvm/lib/IR/Verifier.cpp | ||
---|---|---|
665 | 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. |
llvm/lib/IR/Verifier.cpp | ||
---|---|---|
665 | 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 |
llvm/lib/IR/Verifier.cpp | ||
---|---|---|
665 | Oh, I can just use a string here |
Before submitting I noticed the test added in 9aff829f78331ef3718bf73ea81d319c91730808 is failing on the reference to self. The test looks like a mistake to me. The commit message suggests this could have been anything. I also don't understand the test, since it's linking a single IR file (Is it missing an input?)
llvm/lib/IR/Verifier.cpp | ||
---|---|---|
665 | I couldn't come up with a test where this happened. We also tend to emit every verifier error possible |
Fix linker test that had a global associate to itself, add more comprehensive link test
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.