[Verifier] Check that !nonnull metadata is empty
authorNikita Popov <npopov@redhat.com>
Fri, 20 Jan 2023 16:06:46 +0000 (17:06 +0100)
committerNikita Popov <npopov@redhat.com>
Mon, 23 Jan 2023 10:16:49 +0000 (11:16 +0100)
commit474f20ba26400559e5d99fd4f29926253092f00b
treed1cf02733adc1b8266ebcb45bc8324b0a260e55d
parent65420c8041f4ca44a3a14c5f7faf426ee6a7c6a4
[Verifier] Check that !nonnull metadata is empty

!nonnull expectes an empty metadata argument, so check that this
is the case in the verifier. This came up as a problem in
https://reviews.llvm.org/D141386.

This requires dropping the verifier call in the compatibility-6.0.ll
test (which is not present in any of the other bitcode compatibility
tests). The original input unfortunately used typo'd nonnull
metadata.
llvm/lib/IR/Verifier.cpp
llvm/test/Bitcode/compatibility-6.0.ll
llvm/test/Verifier/nonnull_metadata.ll [new file with mode: 0644]