brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 6767d94 Raw
54 lines · plain
1; RUN: not mlir-translate %s -import-llvm -split-input-file -error-diagnostics-only 2>&1 | FileCheck %s --check-prefix=ERROR2; RUN: not mlir-translate %s -import-llvm -split-input-file 2>&1 | FileCheck %s --check-prefix=DEFAULT3; RUN: not mlir-translate %s -import-llvm -split-input-file -emit-expensive-warnings 2>&1 | FileCheck %s --check-prefix=EXPENSIVE4 5; ERROR-NOT: warning:6; DEFAULT:   warning:7; EXPENSIVE: warning:8define void @warning(i64 %n, ptr %A) {9entry:10  br label %end, !llvm.loop !011end:12  ret void13}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 dso_local void @tbaa(ptr %0) {25  store i32 1, ptr %0, align 4, !tbaa !226  ret void27}28 29!2 = !{!3, !3, i64 0, i64 4}30!3 = !{!4, i64 4, !"int"}31!4 = !{!5, i64 1, !"omnipotent char"}32!5 = !{!"Simple C++ TBAA"}33 34; // -----35 36declare void @llvm.dbg.value(metadata, metadata, metadata)37 38; ERROR-NOT:   warning:39; DEFAULT-NOT: warning:40; EXPENSIVE:   warning:41define void @dropped_instruction(i64 %arg1) {42  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 !543  ret void44}45 46!llvm.dbg.cu = !{!1}47!llvm.module.flags = !{!0}48!0 = !{i32 2, !"Debug Info Version", i32 3}49!1 = distinct !DICompileUnit(language: DW_LANG_C, file: !2)50!2 = !DIFile(filename: "import-failure.ll", directory: "/")51!3 = !DILocalVariable(scope: !4, name: "arg1", file: !2, line: 1, arg: 1, align: 64);52!4 = distinct !DISubprogram(name: "intrinsic", scope: !2, file: !2, spFlags: DISPFlagDefinition, unit: !1)53!5 = !DILocation(line: 1, column: 2, scope: !4)54