1; RUN: not mlir-translate %s -import-llvm -split-input-file -error-diagnostics-only 2>&1 | FileCheck %s --check-prefix=ERROR 2; RUN: not mlir-translate %s -import-llvm -split-input-file 2>&1 | FileCheck %s --check-prefix=DEFAULT 3; RUN: not mlir-translate %s -import-llvm -split-input-file -emit-expensive-warnings 2>&1 | FileCheck %s --check-prefix=EXPENSIVE 4 5; ERROR-NOT: warning: 6; DEFAULT: warning: 7; EXPENSIVE: warning: 8define void @warning(i64 %n, ptr %A) { 9entry: 10 br label %end, !llvm.loop !0 11end: 12 ret void 13} 14 15!0 = distinct !{!0, !1, !2} 16!1 = !{!"llvm.loop.disable_nonforced"} 17!2 = !{!"llvm.loop.typo"} 18 19; // ----- 20 21; ERROR: error: 22; DEFAULT: error: 23; EXPENSIVE: error: 24define i32 @error(ptr %dst) { 25 indirectbr ptr %dst, [label %bb1, label %bb2] 26bb1: 27 ret i32 0 28bb2: 29 ret i32 1 30} 31 32; // ----- 33 34declare void @llvm.dbg.value(metadata, metadata, metadata) 35 36; ERROR-NOT: warning: 37; DEFAULT-NOT: warning: 38; EXPENSIVE: warning: 39define void @dropped_instruction(i64 %arg1) { 40 call void @llvm.dbg.value(metadata !DIArgList(i64 %arg1, i64 undef), metadata !3, metadata !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus, DW_OP_stack_value)), !dbg !5 41 ret void 42} 43 44!llvm.dbg.cu = !{!1} 45!llvm.module.flags = !{!0} 46!0 = !{i32 2, !"Debug Info Version", i32 3} 47!1 = distinct !DICompileUnit(language: DW_LANG_C, file: !2) 48!2 = !DIFile(filename: "import-failure.ll", directory: "/") 49!3 = !DILocalVariable(scope: !4, name: "arg1", file: !2, line: 1, arg: 1, align: 64); 50!4 = distinct !DISubprogram(name: "intrinsic", scope: !2, file: !2, spFlags: DISPFlagDefinition, unit: !1) 51!5 = !DILocation(line: 1, column: 2, scope: !4) 52