mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 11:36:46 +00:00

This PR implements `verify-diagnostics=only-expected` which is a "best effort" verification - i.e., `unexpected`s and `near-misses` will not be considered failures. The purpose is to enable narrowly scoped checking of verification remarks (just as we have for lit where only a subset of lines get `CHECK`ed).
25 lines
1.1 KiB
MLIR
25 lines
1.1 KiB
MLIR
// Check that verify-diagnostics=only-expected passes with only one actual `expected-error`
|
|
// RUN: mlir-translate %s --allow-unregistered-dialect -verify-diagnostics=only-expected -split-input-file -mlir-to-llvmir
|
|
|
|
// Check that verify-diagnostics=all fails because we're missing two `expected-error`
|
|
// RUN: not mlir-translate %s --allow-unregistered-dialect -verify-diagnostics=all -split-input-file -mlir-to-llvmir 2>&1 | FileCheck %s --check-prefix=CHECK-VERIFY-ALL
|
|
// CHECK-VERIFY-ALL: unexpected error: cannot be converted to LLVM IR: missing `LLVMTranslationDialectInterface` registration for dialect for op: simple.terminator1
|
|
// CHECK-VERIFY-ALL: unexpected error: cannot be converted to LLVM IR: missing `LLVMTranslationDialectInterface` registration for dialect for op: simple.terminator3
|
|
|
|
llvm.func @trivial() {
|
|
"simple.terminator1"() : () -> ()
|
|
}
|
|
|
|
// -----
|
|
|
|
llvm.func @trivial() {
|
|
// expected-error @+1 {{cannot be converted to LLVM IR: missing `LLVMTranslationDialectInterface` registration for dialect for op: simple.terminator2}}
|
|
"simple.terminator2"() : () -> ()
|
|
}
|
|
|
|
// -----
|
|
|
|
llvm.func @trivial() {
|
|
"simple.terminator3"() : () -> ()
|
|
}
|