Since https://reviews.llvm.org/D144004, DwarfDebug asserts if function-local imported entities are present in the imports field of DICompileUnit. This patch adds a Verifier check to detect such invalid IR earlier. Incorrect occurrences of imported entities in DICompileUnit's imports field in llvm/test/Bitcode/DIImportedEntity_elements.ll, llvm/test/Bitcode/DIModule-fortran-external-module.ll are fixed. This change is extracted from https://reviews.llvm.org/D144008.
This directory contains testcases that the verifier is supposed to detect as malformed LLVM code. Testcases for situations that the verifier incorrectly identifies as malformed should go in the test/Assembler directory.