1; RUN: llc -mtriple=riscv32 -mattr=+save-restore < %s 2 3; Ensure that the addition of framesetup instructions which call save/restore 4; libcalls do not cause a crash when DIFlagAllCallsDescribed is set. 5 6define i32 @main() noreturn nounwind !dbg !7 { 7entry: 8 tail call void @exit(i32 0) 9 unreachable 10} 11 12declare void @exit(i32) noreturn 13 14!llvm.dbg.cu = !{!0} 15!llvm.module.flags = !{!3, !4, !5} 16!llvm.ident = !{!6} 17 18!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None) 19!1 = !DIFile(filename: "saverestore.c", directory: ".") 20!2 = !{} 21!3 = !{i32 7, !"Dwarf Version", i32 5} 22!4 = !{i32 2, !"Debug Info Version", i32 3} 23!5 = !{i32 1, !"wchar_size", i32 4} 24!6 = !{!"clang"} 25!7 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 1, type: !8, scopeLine: 1, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2) 26!8 = !DISubroutineType(types: !9) 27!9 = !{!10} 28!10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 29