mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
77a0728d96
Fix debug info in these tests, which started failing with a WIP patch to verify compile units and types. The problems look like they were all caused by bitrot. They fell into these categories: - Using `!{i32 0}` instead of `!{}`. - Using `!{null}` instead of `!{}`. - Using `!MDExpression()` instead of `!{}`. - Using `!8` instead of `!{!8}`. - `file:` references that pointed at `MDCompileUnit`s instead of the same `MDFile` as the compile unit. - `file:` references that were numerically off-by-one or (off-by-ten). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233415 91177308-0d34-0410-b5e6-96231b3b80d8
38 lines
1.7 KiB
LLVM
38 lines
1.7 KiB
LLVM
; RUN: %llc_dwarf -asm-verbose -O1 -o %t < %s
|
|
; RUN: grep DW_AT_APPLE_omit_frame_ptr %t
|
|
; RUN: %llc_dwarf -disable-fp-elim -asm-verbose -O1 -o %t < %s
|
|
; RUN: grep -v DW_AT_APPLE_omit_frame_ptr %t
|
|
|
|
|
|
define i32 @foo() nounwind ssp {
|
|
entry:
|
|
%retval = alloca i32 ; <i32*> [#uses=2]
|
|
%0 = alloca i32 ; <i32*> [#uses=2]
|
|
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
|
|
store i32 42, i32* %0, align 4, !dbg !0
|
|
%1 = load i32, i32* %0, align 4, !dbg !0 ; <i32> [#uses=1]
|
|
store i32 %1, i32* %retval, align 4, !dbg !0
|
|
br label %return, !dbg !0
|
|
|
|
return: ; preds = %entry
|
|
%retval1 = load i32, i32* %retval, !dbg !0 ; <i32> [#uses=1]
|
|
ret i32 %retval1, !dbg !7
|
|
}
|
|
|
|
!llvm.dbg.cu = !{!3}
|
|
!llvm.module.flags = !{!12}
|
|
!9 = !{!1}
|
|
|
|
!0 = !MDLocation(line: 2, scope: !1)
|
|
!1 = !MDSubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 2, file: !10, scope: null, type: !4, function: i32 ()* @foo)
|
|
!2 = !MDFile(filename: "a.c", directory: "/tmp")
|
|
!3 = !MDCompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: 0, file: !10, enums: !11, retainedTypes: !11, subprograms: !9, imports: null)
|
|
!4 = !MDSubroutineType(types: !5)
|
|
!5 = !{!6}
|
|
!6 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
|
|
!7 = !MDLocation(line: 2, scope: !8)
|
|
!8 = distinct !MDLexicalBlock(line: 2, column: 0, file: !10, scope: !1)
|
|
!10 = !MDFile(filename: "a.c", directory: "/tmp")
|
|
!11 = !{}
|
|
!12 = !{i32 1, !"Debug Info Version", i32 3}
|